ASP.NET Checkbox List - How to read what was checked after submit
Posted on 2007-11-16
I have a dynamic checkbox list
<asp:CheckBoxList ID="CheckBoxList1" DataSource="<%# DataSet1.DefaultView %>" DataTextField="Description" DataValueField="ID" runat="server" RepeatDirection="Vertical" RepeatLayout="table"></asp:CheckBoxList>
Works great and displays correctly.
Once the user has checked the boxes they want, how do I read what was checked on the submitted page?
What I am trying to do is build a page that checks for available times in the database
Eg: The user may select Lesson1,Lesson2 and Lesson6
The resulting page will search the database for anything with those requirements and return a datagrid or repeater.
How do I know what boxes have been ticked so I can build my query.
Thanks a lot