Validating A Checkbox . . .
. . . and other ASP.NET controls that the Validation controls can not be wired to.
The presentation today may be something you already know how to do. But, this question comes up repeatedly in my work as a .NET coach, which means there are still people who don’t know how to do this. There are other people who think they know how to do this but are hacking the solution. I encourage you to watch the video. My bet is that 80% of you that do will learn something you didn’t already know about the validation controls and how to use them properly.
Here’s the basic problem. There are controls in the .NET framework that can not be wired to the standard validation controls. The checkbox control is one example. You can’t use the RequiredFieldValidator because it has a value. It’s either true or false. And you can’t provide a RegularExpressionValidator or one of the others because it is a boolean value.
So, if I want to make sure a check box is checked before the user continues, for example. And, I want to make sure that the error message shows up in the error summary control like every other error, how do I do that?
Other Related Items:
ASP.Net Essential TrainingThousands of businesses have used ASP.NET to build
Danner Koi NetTelescoping up to 6.5'. Designed for Koi. Heavy duty aluminum construction. Soft, fish-safe nylon netting. Sure-grip handle.
Beginner's ASP.NET in VB.NET 2003 on DVDASP.NET (VB.NET) 2003 represents an important technology for building enterprise level web applications. Learn the basics of ASP.NET development as yo... Read More >
If you're new here, you may want to subscribe to the mailing list to get notifications of new post and a virtual tour of past topics. Thanks for visiting!










Hi Dave,
I’ve just watched your YouTube video of how to validate a checkbox – it almost worked but I’m a little confused with the code as I use C# in VWD 2008.
Can you help?
Thanks
Brian.
Probably. Let’s try to do it through the comment system so that others will benefit.
Hi Dave, May i get the example validate the checkbox its checked or not? Please
Thanks
Andrew