Listing 1 shows you an example of using client-side Java Script to perform form validation.
After the user enters data into a Web form, clicks the Submit button, and sends the form data to the server as a request, you can perform server-side validation on the data.If the data is incorrect or not valid, you can send back a response stating this.If, however, when the user clicks the Submit button, a scripting language that is part of the overall HTML page is initiated to check the validity of the data before it is sent to the server, this is client-side validation.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.These forms are made up of different types of HTML elements that are constructed using straight HTML, HTML server controls, or Web server controls.A variety of HTML elements, such as text boxes, check boxes, radio buttons, drop-down lists and more, can be used in forms. NET applications are collecting information from a user, you want to ensure that the data that you collect is valid.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.From there, you can compare user input in different fields or against values that might be held in other repositories, such as a database.You can check for many types of information, as you learn in the rest of this article.