RadioButtonList r = (sender as RadioButtonList);
Control ctl = r.Parent;
/*
while (ctl != null && !(ctl is RepeaterItem))
ctl = ctl.Parent;
 */
if (null != ctl)
{
int idx = ((RepeaterItem)ctl).ItemIndex;
// ...
}

解决方案 »

  1.   

    设置radiobuttonlist的commandName
    Repeater 的ItemCommand事件通过 e.CommandName判断
    然后转换类型,取id
      

  2.   


    触发事件
    ((RadioButtonList)studentList.Items[0].FindControl("SShow")).SelectedIndexChanged+=new EventHandler(SShow_SelectedIndexChanged);
    private void SShow_SelectedIndexChanged(object sender, EventArgs e)
    {}取ID
    ((RadioButtonList)studentList.Items[0].FindControl("SShow)).ID