ASP error Integration

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.