Question: Please need help for my code which i have no idea what i have to do, i have checkbox on gridview, then i am getting

Please need help for my code which i have no idea what i have to do, i have checkbox on gridview, then i am getting the value of the selected check box. first index is the true or false if user select a checkbox, and second and third i am getting value to delete the selected item. (it may user click and unclick the same checkbox before click on the delete) and if user select and unselect a check box, programm not to delete a row, but mine it does delete a row if unselected the same check box. help please.

 asp.net code       c# code: protected void btnDelete_Click(object sender, EventArgs e) { string[] Checked = hfLegalRecords.Value.Split('|'); for (int i = 0; i < Checked.Length - 1; ++i) { Boolean checkSelect = false; string[] value = Checked[i].Split(','); string checkbox = value[0]; string ClientCode = value[1]; string DebtorNumber = value[2]; for (int j = 0; j < Checked.Length - 1; ++j) { string[] valueS = Checked[j].Split(','); string checkboxS = value[0]; string ClientCodeS = value[1]; string DebtorNumberS = value[2]; if (ClientCode == ClientCodeS && DebtorNumber == DebtorNumberS && checkbox == checkboxS) checkSelect = true; } LegalEvents.RemoveSelectCheckBox(ClientCode, DebtorNumber); } 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!