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:
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;
}
}
}