O'Reilly logo

Sams Teach Yourself ASP.NET 3.5 in 24 Hours, Complete Starter Kit by Scott Mitchell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12. Validating User Input with Validation Controls

<feature><title></title>

In this hour, we will cover

  • The various classes of input validation

  • How to use the RequiredFieldValidator to ensure that the user has provided input

  • How to use the CompareValidator

  • How to ensure that the user’s input falls between a range of values by using the RangeValidator

  • How to use the RegularExpressionValidator

</feature>

As we have examined in previous hours, collecting user input through an ASP.NET page is a relatively easy task. Unfortunately, when we’re collecting a user’s input, there is no guarantee that it has been provided in an acceptable format. Consider a page that prompts the user for his weight, much like we did with the BMI calculator a few hours ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required