Question: c# I am getting a few String from checkBox list and then I want to separated the return string variable into text box and each

c#

I am getting a few String from checkBox list and then I want to separated the return string variable into text box and each string variable separated by (,) Comma, how can i do that?

this is my c# code.

protected void btnUpdate_Click(object sender, EventArgs e) { btnSaveLegalEventSelect.Visible = true; btnSaveLegalEvent.Visible = false; string[] Checked2 = hfLegalRecords.Value.Split('|'); for (int i = 0; i < Checked2.Length - 1; ++i) { Boolean checkSelect2 = false; string[] value2 = Checked2[i].Split(','); string checkbox2 = value2[0]; string ClientCode2 = value2[1]; string DebtorNumber2 = value2[2]; string[] CheckedS2 = hfLegalRecords.Value.Split('|'); for (int j = 0; j < CheckedS2.Length - 1; ++j) { string[] valueS2 = CheckedS2[j].Split(','); string checkboxS2 = valueS2[0]; string ClientCodeS2 = valueS2[1]; string DebtorNumberS2 = valueS2[2];

if (DebtorNumber2 == DebtorNumberS2 && ClientCode2 == ClientCodeS2) {

checkSelect2 = Convert.ToBoolean(checkboxS2); } } if (checkSelect2) { int DebtorNumber3; DebtorNumber3 = Convert.ToInt32(DebtorNumber2); SingleLoad(ClientCode2, DebtorNumber3); txtDebtorNumber.Text = DebtorNumber3.ToString() + ",";

} mpeShowEvent.Show(); } LoadLegalRecords(); } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!