发布网友 发布时间:2022-04-23 05:46
共1个回答
热心网友 时间:2022-05-19 16:56
用foreach 遍历:protected void Button1_Click(object sender, EventArgs e)
{
foreach (RepeaterItem ri in Repeater1.Items)
{
if (ri.ItemType == ListItemType.Item || ri.ItemType == ListItemType.AlternatingItem)
{
RadioButtonList rd = ri.FindControl("RadioButtonList1") as RadioButtonList;
if (rd.SelectedItem != null)
{
Response.Write(rd.SelectedItem.Text + " " + rd.SelectedItem.Value + "<br/>");
}
}
}
}