The general dynamic website needs to collect user information through a form, or interact with the user, although we believe in the vast majority of people have chosen
The form will be carefully completed, but it is not possible to avoid the boring people to fill the form.
Fill in errors, or they forget to fill in some options. In order to avoid this, developers will add a verification process to form data to form data.
Before or before the server verifies the data fill in the user, if you encounter an error, return to request the user to correct. Cranes in ASP are usually doing this: 1. Verify with JavaScript on the client. 2. Verify with VBScript on the client. 3. Verify with VBScript on the server side. The above mentioned two different environments, server-side and clients, client authentication actually included in the downloaded page, when the user submits the form
Waiting, it is verified directly in the local page that has been downloaded to a local page, which can reduce the server end. The server-side verification is
The page is submitted to the server processing, and the other ASP page on the server will execute the verification of the form before returning the result to the client. Such a disadvantage is that each
Once verified, you have to pass the server and the time is longer. But using server-side verification can achieve better verification. This article is to tell the verification of the server side in the ASP. Before you understand the following introduction methods, you need to think about what you need to be controlled in the form verification problem. Just like software engineering ideas
When you analyze what kinds of respect should be verified. 1. Require the user's input must be Chinese (English or number). 2, require the user's input must be a valid email address. 3. Various different limits for the data entered by the user. 4. Limit the amount of data input by the user. 5, .... In fact, we will encounter many different problems in the site design, and we need to define some regulations and restrictions. Below we will tell the verification method in an example. 1. Verify the number of inputs to assume a text box