ASP.Net/VB.Net/DataList: How to reset all the checkboxes in a datalist
Posted on 2004-08-10
I have a web form that contains a datalist. Each cell of the datalist contains a checkbox. It looks something like this:
[ ] Select All
[ ] Person A
[ ] Person B
[ ] Person C
[ ] Person D
The CheckBox.Text property gets its name from databinding to a Name field in a database. The checkbox value is unbound. What I intend to do is insert records into a table for each checked box.
When I turn on the Select All checkbox at the top I want all of the other check boxes to be turned on, and vice versa. What is the code for doing this?