By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,640 Members | 1,598 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,640 IT Pros & Developers. It's quick & easy.

proper way to check radio button value?

P: n/a
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.
Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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!
***************************

"Flip" wrote:
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.

Nov 18 '05 #2

P: n/a
Flip wrote:
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
Nov 18 '05 #3

P: n/a
> the radiobutton group try using Request.Form["group_Name"]
That sounds like it'll work. I'll try it tonigth! :> Thank you.
Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.