![]() |
|
|
ASP.NET Validation Controls Part 1Importance of Form Validation Form validation ensures a user not only enters or selects values when required but also enters appropriate and correctly formatted values. Feedback, contact and registration forms as well as content management systems that support insert, update and delete functions are all common scenarios where form validation should be implemented. It’s important to ensure that data you store in a database is standardized, comprehensive and complete. Incorrectly formatted email addresses, invalid phone numbers or empty shipping addresses amongst other things will undermine the effectiveness and quality of the data in your web application.
You should also be wary of script errors that might be caused by a user entering incorrect variable types e.g. a user entering a string in a mortgage calculation box when an integer is required. Form validation also protects against a malicious user attempting to directly enter HTML, Javascript, SQL or other inappropriate code. Validation in ASP was time consuming and cumbersome. The ASP.NET team in their wisdom tackled this area and developed the validation controls to make form validation a lot fastier and easier. The Validation Controls With ASP.NET 2.0 there are now 6 validation controls including the ValidationSummary control.
Site developed by Michael Wall - Web Design Belfast N.Ireland. |
|