Reputation: 295
Are you required applicant?
<asp:CheckBox ID="CheckBox1" runat="server" Text="Yes" />
<asp:CheckBox ID="CheckBox2" runat="server" Text="No" />
Actually this is code, i do not know why they use two Checkbox instead of Checkboxlist, but they told me do not change it. and make the two checkbox required(using RequiredFieldValidator). I know how to use RequiredFieldValidator, but how can i make RequiredFieldValidator control two Checkbox, only pass if one of them selected
Upvotes: 2
Views: 1795
Reputation: 477
Required Field Validator only works on one control at a time -- you'll want to use Custom Validator, or just write your own client/server validation independent of the ASP.NET validators.
See also:
How do I make a checkbox required on an ASP.NET form?
javascript for two checkboxes in aspx
Upvotes: 2