Hello, I have following:
<asp:CheckBoxList ID="CheckBoxList1" runat="server" >
</asp:CheckBoxList>
Then:
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
CheckBoxList1.Items.Add(new ListItem("item1"));
CheckBoxList1.Items.Add(new ListItem("item2"));
}
else
CheckState();
}
Problem is everytime I debug in CheckState(), CheckBoxList1.Item[0].Selected and CheckBoxList1.Item[1].Selected is always false, even if the checkbox is actually checked!
help?