i have Three Checkbox List on my page and i am adding any checked checkbox List Item to to a list box Control
and when i am removing any item from list box then i also want to Uncheck That Listitem on My checkBox List
so far i am finding which Checkbox List Contains that checkbox this and it working
but i don't Have Idea how i can Uncheck That Item wich Contains That text
if (listboxControl.SelectedIndex > 0)
{
string na = listboxControl.SelectedItem.Text;
listboxControl.Items.RemoveAt(listboxControl.SelectedIndex);
var cb1 = CheckBoxList1.Items.FindByText(na);
var cb2 = CheckBoxList2.Items.FindByText(na);
var cb3 = CheckBoxList3.Items.FindByText(na);
if (cb1 != null)
{
//here how i can Uncheck That Item
}
else if (cb2 != null)
{
//here how i can Uncheck That Item
}
else if (cb3 != null)
{
//here how i can Uncheck That Item
}
else
{
}
}
Aucun commentaire:
Enregistrer un commentaire