CheckBoxList ViewState / Uncheck

P

peterw

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

Peter
 
P

peterw

Already knew what I did wrong; I copied the html of the checkboxlist with
javascript;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top