Some netizens always call the error pages on other ASP pages after completing the error pages one by one. For example, there are usually two error messages on a login page, one is the most common Password error, and the other is that the user name is not registered. Generally, users will make two pages for processing. One page will display: error, Password error !, An error occurred while not registering the user name.
In fact, you only need to make a page to Display Error information that cannot be displayed!
The following is an example of a program:
<Body> <br> <p> </P>
<Div align = "center"> <center>
<Table border = "1" width = "400" bordercolorlight = "# 6699cc" bordercolordark = "# 6699cc" cellspacing = "0">
<Tr> <TD width = "100%" bgcolor = "# c4e1ff"> error message </TD> </tr>
<Tr> <TD width = "100%"> <p align = "center"> <br>
<% Select case request ("N ")
Case "1"
Response. Write "user and Password error"
Case "2"
Response. Write "Enter the customer name"
End select %>
<Br>
<Input type = "button" value = "return" name = "B1" onclick = "javascript: history. Go (-1)">
<Br> </P> </TD> </tr>
</Table> </center> </div> </body>
In the above example, the main part is:
<% Select case request ("N ")
Case "1"
Response. Write "Password error"
Case "2"
Response. Write "User Name Not registered"
End select %>
You only need to call this error page in the case of an error (generally, I will name it as wrong. ASP), add n = 1, 2, 3 ...... (For example, response is used when a Password error occurs. redirect "wrong. asp? N = 1 ")
In this way, ASP error pages are integrated into one page for processing! We wrote this article in meetasp.net to allow everyone to write simple programs.