Using Asp.net Webforms how can I validate that a checkbox has been checked. (I cannot do a postback) has to be in javascript (either custom – working with the existing validation controls for other fields. or using a .net validation control)
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use a CustomValidator control and specify an ClientValidationFunction javascript function.
Find more info here:
http://forums.aspfree.com/net-development-11/compare-validator-for-a-checkbox-121590.html
But if you’re only doing client-side validation, the whole CustomValidator implementation might be a bit useless. Just validate the checkbox with javascript on the form submit.