js 父页中的单选按钮取值
发布时间:2016-12-29 来源:查字典编辑
摘要:intstarvalue=3;ContentPlaceHolderch=(ContentPlaceHolder)Master.FindCon...
int starvalue = 3;
ContentPlaceHolder ch = (ContentPlaceHolder)Master.FindControl("middlecontent");
RadioButton radio = new RadioButton();
for (int i = 1; i <= 5;i++ )
{
radio = (RadioButton)ch.FindControl("rblStar" + i);
if (radio.Checked == true)
{
starvalue = i;
break;
}
}
MessageBox.Show(starvalue.ToString());