...

View Full Version : how to call default 404 error page in asp



Rashmir
01-20-2005, 04:36 AM
Hi all,

I want to call the default 404 error page in my asp.In my program if their is any error occured I want to display the default error page,so can any of you please say how to call the default 404 error html page in asp.

Thanks in advance

Regards,
Rashmi

glenngv
01-20-2005, 06:01 AM
In IIS, go to Default Web Site Property dialog box, Custom Errors Tab, look for 404 and then edit it to set new HTML file to use.

jaywhy13
02-04-2005, 12:20 PM
Is there a way that the same thing can be achieved when u r coding on an ASP server and don't have that kinda flexibility?

gwendaal
02-04-2005, 01:14 PM
yes it's very easy :-)

on error resume next

run any code here

If Err.Number <> 0 then
Response.Redirect("dhhfhrhflhfhfwefhwwfhewfkhewfjewfhewjfhw.asp")
End if

as far as this page doesn't exist you'll get a wonderfull 404 error

MrFreeze
02-04-2005, 03:11 PM
How about:

if error then
response.status = "404 Not Found"
end if



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum