Recent Posts
Calendar
January 2008
S M T W T F S
« Dec   Feb »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Archive for January 4th, 2008

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.

Read the rest of this entry »