I'm trying to validate a checkbox with the CustomValidator, but it doesn't seem to be firing. Does it have to do with the fact that I have some regular validator tags on other fields that are firing when the submit button is clicked? They all work just fine--but this one doesn't. There's no message, and no error message, either.
.ASPX PAGE
<asp:CheckBox ID="chkConsent" runat="server" />
<asp:CustomValidator id="cust_CheckBoxPrint" runat="server" ErrorMessage="Required!" OnServerValidate="ValidateCheckbox">* required</asp:CustomValidator>
CODEBEHIND PAGE
Sub ValidateCheckbox(ByVal source As Object, ByVal args As ServerValidateEventArgs)
args.IsValid = (chkConsent.Checked = True)
End Sub
If so, you could add a piece of javascript in order to validate the checkbox on client-side.