ARTICLE AD BOX
I'm populating multiple CheckBoxList from the database in the codebehind. But when I click the update button, all the items vanish.
Page Load

When Update button click

The page_load !IsPostBack
cblLanguage.DataSource = GenericClass.GetCheckboxList(4);
cblLanguage.DataValueField = "keyfield";
cblLanguage.DataTextField = "textfield";
cblLanguage.DataBind();
cblLanguage.EnableViewState = true;
aspx code:
<h1>Language</h1>
<asp:CheckBoxList runat="server" ID="cblLanguage" RepeatColumns="10" CssClass="checkboxlist_nowrap" Width="100%" />
I'm not sure what I'm missing. I'm enabling the view state for all the CheckBoxLists, but they all vanish when the page is reloaded to save the data. The GetCheckboxList is a static public DataTable which works when the page loaded. Thanks in advance.
2392 gold badges5 silver badges14 bronze badges
Explore related questions
See similar questions with these tags.
