RadioButtonList value in repeater

Discussion in '.NET' started by IFIA, Mar 13, 2008.

  1. IFIA

    IFIA

    Joined:
    Mar 7, 2008
    Messages:
    2
    Hi,

    I have a radiobuttonlist within a nested repeater, resulting in multiple radiobuttonlists.

    On a button click how do I find out what those selected values of the radiobuttons were?

    Code so far:


    Code:
    protected void Button1_Click(object sender, EventArgs e)
        {
            foreach (RepeaterItem rtpItem in RepWorkArea.Items)
            {
                Repeater rp = (Repeater)(rtpItem.FindControl("RepQuestions"));
                foreach (RepeaterItem rtpItem2 in rp.Items)
                {
                    RadioButtonList rbl = (RadioButtonList)rtpItem2.FindControl("rblAnswers");
                    label22.Text += rbl.SelectedItem.Value;
                }
            }
        }
    IFIA, Mar 13, 2008
    #1
    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. David Davis

    RadioButtonList in a repeater

    David Davis, Oct 21, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,945
    David Davis
    Oct 21, 2003
  2. Ravi
    Replies:
    2
    Views:
    4,433
    jagdish
    Aug 18, 2006
  3. Darren
    Replies:
    1
    Views:
    5,925
    Curt_C [MVP]
    Sep 28, 2004
  4. Rod  Snyder
    Replies:
    1
    Views:
    3,570
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Feb 17, 2005
  5. Guldo K

    Repeater + RadioButtonList

    Guldo K, Nov 5, 2005, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    285
Loading...

Share This Page