Groups | Blog | Home
all groups > asp.net webcontrols > december 2004 >

asp.net webcontrols : CheckBoxList ViewState / Uncheck



peterw
12/28/2004 3:01:01 AM
Hello,

I have a checkboxlist populated by a database and a button. I check some
items in the checkboxlist and submit with the button, the checkboxlist items
remain checked. If I then want to uncheck some items, and submit with the
button, the items are checked again. Anyone has a solution / idea what i do
wrong?

the checkboxlist has the viewstate enabled.
the checkboxlist is populated in the Page_Load:

private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
if(!Page.IsPostBack)
{
PopulateCheckBoxList();
}
}

TIA

peterw
12/28/2004 4:47:04 AM
Already knew what I did wrong; I copied the html of the checkboxlist with
Daren Johnson
1/26/2006 12:00:00 AM
What was your solution? I seem to have the same problem.

From http://www.developmentnow.com/g/15_2004_12_0_0_31975/CheckBoxList-ViewState-Uncheck.htm

Posted via DevelopmentNow.com Groups
AddThis Social Bookmark Button