Validating form in javascript

By Bill Evjen Reuters December 2003 Applies to: Microsoft® ASP. NET validation server controls that are at your disposal.

NET Summary: Learn how to use all the available ASP.

From there, you can compare user input in different fields or against values that might be held in other repositories, such as a database.

Nothing is more annoying to a user who is on a dial-up connection than clicking the Submit button on the form and then waiting for 20 seconds to find out that they didn't enter their password correctly.

The other option for form validation is to put some client-side Java Script or VBScript at the top of the ASP page that checks if the information in the fields is correct.

Some sites on the Internet don't carry this inputted information back to the form page, and the user is then required to enter all the information into the form a second time.

Obviously, this may cause people to leave your site for another.

Validation server controls are a series of controls that help you validate the data that the user enters into the other controls that are provided with ASP. They determine whether the form can be processed based upon the rules that you define in the validation server controls.

One of the most common elements of Web pages is a form in which the user can input data that is posted back to the server.

Data collection on the Internet is one of its most important features, so you must make sure that the data you collect has value and meaning.

You ensure this by eliminating any chance that the information collected does not abide by the rules you outline. NET don't know the difference between client-side and server-side validation.

You must understand these two different ways of validating the data users input into a Web form.

Tags: , ,