RadioButtonList Selected values in Repeater

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CURTISLESPERANCE
    New Member
    • Mar 2008
    • 4

    #1

    RadioButtonList Selected values in Repeater

    Hi,

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

    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;
                }
            }
        }
Working...