proper way to check radio button value?

F

Flip

In setting up a radio button group last night, I added two radio buttons,
gave each of them their respective name and gave them both the same group
name. So far so good. But then when I tried to get the group names
selected value, I couldn't find any properties/methods on that object. In
fact the object didn't exist for me. Is this correct?

When playing with Radio buttons, do you still have to enumerate through all
of them to find the one Clicked? Then what's the GroupName do more than
just ensure not more than one is selected?

Thanks.
 
G

Guest

If you set up multiple radio buttons, the answer is yes. If you are getting
the values for the radio buttons from a database or a list you can lookup
each time (or a static set of values), use a RadioButtonList instead. Then,
you can pull selected value from the group rather than iterate through
individual radio buttons.


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
A

Alexander

Flip said:
In setting up a radio button group last night, I added two radio buttons,
gave each of them their respective name and gave them both the same group
name. So far so good. But then when I tried to get the group names
selected value, I couldn't find any properties/methods on that object. In
fact the object didn't exist for me. Is this correct?

When playing with Radio buttons, do you still have to enumerate through all
of them to find the one Clicked? Then what's the GroupName do more than
just ensure not more than one is selected?

Thanks.
Hi Flip,
I have found the radiobuttonlist has a value property but it is not
very flexible for design purposes. If you need to access the value of
the radiobutton group try using Request.Form["group_Name"]

A
 
F

Flip

the radiobutton group try using Request.Form["group_Name"]
That sounds like it'll work. I'll try it tonigth! :> Thank you.
 

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,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top