How to use requiredfieldvalidator for radiobuttonlist in asp.net?
Answers
Answered by
0
<asp:RadioButton ID="RadioButton1" runat="server" Text="Male" GroupName="gender" />
<asp:RadioButton ID="RadioButton2" runat="server" Text="Female" GroupName="gender" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Gender is requried"
ControlToValidate="gender" ForeColor="red">
</asp:RequiredFieldValidator>
<asp:RadioButton ID="RadioButton2" runat="server" Text="Female" GroupName="gender" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Gender is requried"
ControlToValidate="gender" ForeColor="red">
</asp:RequiredFieldValidator>
Similar questions