RadioButtonList value in repeater

Joined
Mar 7, 2008
Messages
2
Reaction score
0
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;
            }
        }
    }
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top