Repeating list of checkboxes

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
 
S

Scott Allen

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.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top