Chapter 16. Adding Form Field Validation Using ASP.NET

IN THIS CHAPTER

The Necessity of Form Validation

ASP.NET Validation Controls

Common Validation Control Properties

Adding and Configuring ASP.NET Validation Controls

Checkpoint

The Necessity of Form Validation

If you’re going to offer a form for user input on your website, you should always validate the input that the user provides. There are a couple of reasons why form validation is important. First of all, it ensures that the user provides you with the kind of information you expect. If you are expecting a phone number and a user enters text, you end up with bad data.

Secondly, it ensures that a malicious user doesn’t cause problems by entering bad data. For example, suppose you have a ...

Get The Microsoft Expression Web Developer's Guide to ASP.NET 3.5: Learn to create ASP.NET applications using Visual Web Developer 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.