欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

js 父页中的单选按钮取值

程序员文章站 2022-05-22 13:50:27
int starvalue = 3; contentplaceholder ch = (contentplaceholder)master.findcontrol("mid...
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());