Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Checking if any item in a radio list is checked

Reply
Thread Tools

Checking if any item in a radio list is checked

 
 
Darrel
Guest
Posts: n/a
 
      04-21-2009
Is there a one-line way to check to see if there is an item in a radiobutton
list that is checked? Or does one need to test each radiobutton in the list?
I assume one can do the former, but I'm at a loss for the syntax.

-Darrel


 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      04-22-2009
Radiobutton? Sure, only one of a group is ever "checked". Checklist? Yes,
but it can be dangerous if the list can change. The rendered id stays the
same after the control is rendered, as long as you do not change conditions,
number of items or placement (place it in a control, for example).

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

*********************************************
| Think outside the box!
|
*********************************************
"Darrel" <> wrote in message
news:...
> Is there a one-line way to check to see if there is an item in a
> radiobutton list that is checked? Or does one need to test each
> radiobutton in the list? I assume one can do the former, but I'm at a loss
> for the syntax.
>
> -Darrel
>


 
Reply With Quote
 
 
 
 
Darrel
Guest
Posts: n/a
 
      04-27-2009
> Radiobutton? Sure, only one of a group is ever "checked". Checklist? Yes,
> but it can be dangerous if the list can change. The rendered id stays the
> same after the control is rendered, as long as you do not change
> conditions, number of items or placement (place it in a control, for
> example).


Well, I ended up doing a for loop to loop through each item in the
radiobuttonlist to check that at least one of the items was actually
checked.

Not a huge deal, but I would have thought there'd have been a built in
property one could check.

-Darrel


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CheckBox Checked=false when checked in DataList yurps ASP .Net 1 02-29-2008 01:08 PM
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
radio button checked change event question Carlos ASP .Net 1 02-24-2005 11:20 PM
Radio button List problem: How to find value of Radio button list's Selected Item using javascript?? Hiten ASP .Net Web Controls 1 05-26-2004 10:32 AM
How do detect previous checked radio button in ASP.NET hy ASP .Net 0 08-01-2003 08:49 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57