当前位置:主页 > 软件编程 > .NET代码 >

js 父页中的单选按钮取值

时间:2022-01-17 10:49:45 | 栏目:.NET代码 | 点击:

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

您可能感兴趣的文章:

相关文章