Lab 6 – Validation Controls
Posted by Rick Tempestini on July 11, 2007
In this lab you will build a simple form that demonstrates the usage of the ASP.NET validation controls. You will create a simple form that accepts a Name, Age, Email, and Phone Number for a person.
The requirements for the text boxes on this entry page are listed below:
| Requirement | Validation Control Needed |
| The Name field is required and cannot be blank | RequiredFieldValidator |
| The Age field must not allow numbers less than zero or greater than 100 | RangeValidator |
| The Email field must capture valid internet email addresses | RegularExpressionValidator |
| The Phone Number field must capture valid phone numbers | RegularExpressionValidator |
You will then configure the validators to properly meet the requirements above. At the end, you will implement the Validation Summary control to change the display of the validation errors.