Some netizens always make the error page one after another, call the wrong page in other ASP pages. For example, in a landing page there will generally be two error messages, one is the most common password error, there is a user name is not registered. General users will do two pages to deal with, a page display: Error, password error! , not a single display: error, user name is not registered.
In fact, you only have to do a page, you can display the error message cannot!
Here is an example of a program:
<body><br><br><br><br><br><br><p> </p>
<div align= "center" ><center>
<table border= "1" width= "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 "Please fill in the Customer name"
End Select%>
<br><br>
<input type= "button" value= "Back" name= "B1" >
<br></p></td></tr>
</table></center></div></body>
The main part of the above program example is:
<%select Case Request ("n")
Case "1"
Response.Write "Password Error"
Case "2"
Response.Write "User name not registered"
End Select%>
You just call the wrong page in the wrong place (usually I'll put the filename as wrong.asp), add n=1,2,3 ... (for example: Response.Redirect "Wrong.asp?n=1" when the password goes wrong)
In this way, the ASP error page is integrated in a page to deal with! We meetasp.net write this article is to let everyone can write a simple knot program.
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