Repeating list of checkboxes

  • Thread starter Thread starter Brian Vallelunga
  • Start date Start date
B

Brian Vallelunga

I have a repeater bound to a datatable. For each item in the data table,
I need a set of known checkboxes to show up. This is easy to do, but I
am not sure how to get the results of the checkboxes on submission. I
have something like this:

May 1
[ ] Item1 [ ] Item2 [ ] Item3 [ ] Item4 [ ] Item5

May 2
[ ] Item1 [ ] Item2 [ ] Item3 [ ] Item4 [ ] Item5

May 3
[ ] Item1 [ ] Item2 [ ] Item3 [ ] Item4 [ ] Item5

May 4
[ ] Item1 [ ] Item2 [ ] Item3 [ ] Item4 [ ] Item5


The dates would come from the datatable. I need to be able to find out
which checkboxes were checked on submission. I could do them as simple
html controls with sequential names, but then they wouldn't maintain
state. How are people doing this? This is a bit different than the
editing a single row, as often done with .net controls.

Thanks,

Brian
 
Hi Brian:

Towards the bottom of this article:
http://odetocode.com/Articles/116.aspx

I have some code to loop through the Repeater items and gather the
value from a TextBox control in each row. I think you could use a
similar approach using the Items collection of the Repeater and
FindControl to get the radio boxes.
 
Back
Top