This is the code I am using to validate the checkbox.I guess I need to add code to detect when user checks it if they submitted without checking it the first time around.Windows Forms provides several ways for you to validate input in your application.If you need to require users to enter data in a well-defined format, such as a telephone number or a part number, you can accomplish this quickly and with minimal code by using the Masked Text Box control.To the user, looks like works the same way the validation, for you, is just a little bit more magic to write.I've spent a couple of hours searching for a solution to validating a checkbox, since the Required Field Validator does not work with Checkboxes. Look for "skm Validators - custom validation controls for Check Boxes and Check Box Lists for ASP. The second step is to write a bit of Java Script (JQuery) to return the non-checked state of the checkbox to validate.This page contains copyright material from //blog.and you have no rights to copy and paste the full text into your own blog even if you have written permission to the contrary. Net has bunch of useful validation controls and they realy make our project so easy in terms of validations. Net doesn't have any control to validate a check box !
NET controls that the Validation controls can not be wired to.Bottom line -- I'd like to know how I can validate that a use has selected at least one option? How would it differentiate between class format and another checkbox group? That way, if you have another group, you can wrap them as well inside a div, give that div another id, and use the same j Query.Notice that this approach doesn't depend on the checkboxes' ids. NET coach, which means there are still people who don’t know how to do this. NET framework that can not be wired to the standard validation controls. You can’t use the Required Field Validator because it has a value. And you can’t provide a Regular Expression Validator or one of the others because it is a boolean value.
But, this question comes up repeatedly in my work as a .The Format event on a data binding can be used to reformat incoming data to comply with the mask, and the Parse event can be used to reformat outgoing data to comply with the specifications of the data field. If you want full programmatic control over validation, or need to perform complex validation checks, you should use the validation events built into most Windows Forms controls.