How To Validate A CheckBox ASP.NET Control

If you attempt to use a RequiredFieldValidator with a CheckBox control, you will get a runtime error that says something like “Control {your checkbox control id} referenced by the ControlToValidate property of {id of your validator control} cannot be validated”. If you want to require an ASP.NET CheckBox control be checked when a form is …

Continue reading

How To Use A RequiredFieldValidator With A DropDownList

I love the ASP.NET validation controls. There are times however when you need to know the ins-and-outs to use them successfully. For example, what do you do when you want to require an option to be selected from a DropDownList on the client side? If you simply add a RequiredFieldValidator, set the right ValidationGroup and …

Continue reading