Please help with Radio buttons

Discussion in 'ASP .Net' started by momo, Nov 7, 2003.

  1. momo

    momo Guest

    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
    momo, Nov 7, 2003
    #1
    1. Advertising

  2. 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.

    --
    Chris Jackson
    Software Engineer
    Microsoft MVP - Windows Shell/UI
    Windows XP Associate Expert
    --
    More people read the newsgroups than read my email.
    Reply to the newsgroup for a faster response.
    (Control-G using Outlook Express)
    --

    "momo" <> wrote in message
    news:u%...
    > 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
    >
    >
    Chris Jackson, Nov 7, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. KK
    Replies:
    2
    Views:
    556
    Big Brian
    Oct 14, 2003
  2. Scott D Johnson
    Replies:
    1
    Views:
    1,064
    Scott D Johnson
    Sep 27, 2006
  3. Dave
    Replies:
    0
    Views:
    137
  4. Dr. Leff
    Replies:
    3
    Views:
    290
    David Mark
    Oct 15, 2007
  5. Dr. Leff
    Replies:
    3
    Views:
    226
    David Mark
    Oct 15, 2007
Loading...

Share This Page