/ Published in: C#
RequiredFieldValidator doesn't support checkboxes, but a customvalidator does the trick.
Expand |
Embed | Plain Text
public void ValidateChecked(object sender, ServerValidateEventArgs e) { e.IsValid = chkMyChkBox.Checked; } //Client side method, referenced in customvalidtor ClientValidationFunction attribute: <script type="text/javascript" language="javascript"> function ValidateCheckboxIsChecked(sender, args) { } </script>
Comments
Subscribe to comments
You need to login to post a comment.

sdafasdf