Please help with Radio buttons

M

momo

Hello all,

I need some help with radio buttons. This is what I have. I have 15 groups
of radio buttons and each group contains three radio buttons which non of
them are selected.

I need a way to see which button in each group was selected. All these radio
buttons are optional, meaning it doesn't have to be selected but if any was
then I need to find out which one did. Please help.


Thanks,

Momo
 
C

Chris Jackson

If you are using <input type=radio ...> elements, then the only way to
determine which is checked is to iterate through every single
HtmlInputRadioButton on the page and interrogate the checked property.
However, you could use the <asp:RadioButtonList ...> object, and test the
SelectedItem group of the list for its value (null if none selected) to save
yourself some code. I'm not sure, but I think that's a new web control for
the 1.1 framework, in case you are still using 1.0.
 

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,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top