I have this code:
for (int i = 0; i < ListView2.Items.Count; i++)
{
int a;
Int32.TryParse(((TextBox)ListView2.Items[i].FindControl("BrankyTextBox")).ToString(), out a);
if (((CheckBox)ListView2.Items[i].FindControl("UcastCheckBox")).Checked=false &&
a > 0)
{
RegisterStartupScript("alertBox2", "<script type='text/javascript'>alert('Error');</script>");
}
}
I want to when checkbox is unchecked the value of textbox must be only 0. But this code only changes all checkbox in listview to unchecked... Have you some idea how to solve it?