当前位置:Gxlcms > asp.net > js 父页中的单选按钮取值

js 父页中的单选按钮取值

时间:2021-07-01 10:21:17 帮助过:13人阅读

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());

人气教程排行