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

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,044
Latest member
RonaldNen

Latest Threads

Top