<asp:RadioButton ID="RadioButton3" runat="server" Checked="True"GroupName="zxcd"Text="a" />
<asp:RadioButton ID="RadioButton4" runat="server" GroupName="zxcd" Text="b" />
<asp:RadioButton ID="RadioButton5" runat="server" GroupName="zxcd" Text="c" />
<asp:RadioButton ID="RadioButton6" runat="server" GroupName="zxcd" Text="d" />
<asp:RadioButton ID="RadioButton7" runat="server" GroupName="zxcd" Text="e" />
string str="";
if(RadioButton3.checked==true)
{
str=RadioButton3.text.trim();
}
else if(RadioButton4.checked==true)
{
str=RadioButton4.text.trim();
}
else if(RadioButton5.checked==true)
{
str=RadioButton5.text.trim();
}
else if(RadioButton6.checked==true)
{
str=RadioButton6.text.trim();
}
else if(RadioButton7.checked==true)
{
str=RadioButton7.text.trim();
}
遍历一下,一个循环的问题.
直接用radiobuttonlist,不就可以解决,radiobuttonlist.selectvalue!!!949494
(⊙o⊙)…...原来是这样.