ASP.NET C# CheckBoxList items vanishing on postback
14:19 02 Dec 2025

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

Page Load
enter image description here

When Update button click
enter image description here

The page_load !IsPostBack
cblLanguage.DataSource = GenericClass.GetCheckboxList(4);

cblLanguage.DataValueField = "keyfield";

cblLanguage.DataTextField = "textfield";

cblLanguage.DataBind();

cblLanguage.EnableViewState = true;

aspx code:

Language

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.

c# asp.net checkboxlist