我正在尝试验证单选按钮。例如,如果未选择单选按钮,则会显示错误消息。我的单选按钮包括添加,乘法,除法和减法。但是,即使我将它们放在一个组名中,当我尝试在controltovalidate字段中输入它们时,我也无法做到。
你们可以告诉我我做错了吗?
谢谢
<td class="auto-style3">
<asp:RadioButton ID="radioAddition" runat="server" Text="Addition (+)" groupname="radiobutton" /><br />
<asp:RadioButton ID="radioSubtraction" runat="server" Text="Subtraction (-)" groupname="radiobutton" /><br />
<asp:RadioButton ID="radioMultiplication" runat="server" Text="Multiplication: (*)" groupname="radiobutton"/><br />
<asp:RadioButton ID="radioDivision" runat="server" Text="Division (/)" groupname="radiobutton"/>
</td>
<td class="auto-style4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>
</td>