Computer Science, asked by Mayankmeena2437, 1 year ago

How to use requiredfieldvalidator for radiobuttonlist in asp.net?

Answers

Answered by aditya1984
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>
Similar questions