/ Published in: C#
RequiredFieldValidator doesn't support checkboxes, but a customvalidator does the trick.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public void ValidateChecked(object sender, ServerValidateEventArgs e) { } //Client side method, referenced in customvalidtor ClientValidationFunction attribute: <script type="text/javascript" language="javascript"> function ValidateCheckboxIsChecked(sender, args) { } </script>