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

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

posted @ 2014-10-09 18:34  哼哼c#  阅读(2530)  评论(0编辑  收藏  举报