首页 > 开发 > .Net > 正文

js 父页中的单选按钮取值

2019-10-27 13:20:45
字体:
来源:转载
供稿:网友
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());
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表