.net里radiobutton 两个怎么才能让他只选择一个

时间:2014-10-09 21:08:47   收藏:0   阅读:188

把两个radiobutton的GroupName设置成相同的就可以了
<asp:RadioButton ID="RadioButton1" runat="server" GroupName="AA" />
<asp:RadioButton ID="RadioButton2" runat="server" GroupName="AA"/>
如果要设置默认选中哪个,就在它上面加 Checked="true"就可以了

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!