Print Page | Close Window

1 Error Page for Lots of Types of Errors

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=3171
Printed Date: 29 March 2026 at 10:15am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: 1 Error Page for Lots of Types of Errors
Posted By: Bliss
Subject: 1 Error Page for Lots of Types of Errors
Date Posted: 31 May 2003 at 9:28am
How do you make an error page where when you see in the address bar, error.asp?type=1 or something and it comes up with a 404 error message, and maybe type 2 comes up with a 401 error?



Replies:
Posted By: pmormr
Date Posted: 31 May 2003 at 9:52am

just have your pages redirect if theres and error to your 'error.asp' page. The have you error.asp page redirect to the files for the errors. Use a series of if statements like.

If request.querystring("type") = 1 then
response.redirect(error404.htm)
elseif request.querystring("type") = 2 then
response.redirect(error401.htm)
end if

you can create your own errors that way too.

Hope i helped



-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: Bliss
Date Posted: 31 May 2003 at 10:05am
Can't I just use the response.write ?


Posted By: Gullanian
Date Posted: 31 May 2003 at 12:04pm
If request.querystring("type") = 1 then
response.write("Somethings wrong")
elseif request.querystring("type") = 2 then
response.write("Something else has gone wrong")
end if


Posted By: Bliss
Date Posted: 31 May 2003 at 8:56pm
Yep, that'll work... Now I just have to find all those dfferent kinds of errors and what they mean... Thanks guys.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net