13.5.09
8.5.09
checkboxlist radiobuttonlist
//pick up value of selected item
string check = CheckBoxList1.SelectedValue;
Int32 i;
string select = CheckBoxList1.SelectedIndex.ToString();
// to clear all checkboxes
for (i = 0; i < CheckBoxList1.Items.Count; i++)
{
CheckBoxList1.Items[i].Selected= false;
}
//check which value is currentlt selected
for (i = 0; i < CheckBoxList1.Items.Count; i++)
{
if (CheckBoxList1.Items[i].Value == check)
{
CheckBoxList1.Items[i].Selected= true;
}
}
string check = CheckBoxList1.SelectedValue;
Int32 i;
string select = CheckBoxList1.SelectedIndex.ToString();
// to clear all checkboxes
for (i = 0; i < CheckBoxList1.Items.Count; i++)
{
CheckBoxList1.Items[i].Selected= false;
}
//check which value is currentlt selected
for (i = 0; i < CheckBoxList1.Items.Count; i++)
{
if (CheckBoxList1.Items[i].Value == check)
{
CheckBoxList1.Items[i].Selected= true;
}
}
Subscribe to:
Posts (Atom)