Catch previous url

J

Jason Zhou

Hi,

I have a question on how to get the previous url in custom error file. Here
is what I am doing:

If someone visit my website with a wrong file name or wrong directory name,
IIS will automatically show error 404 page, this was setup by default in IIS
web site properties/Custom Errors. I replaced that 404b.htm with my aspx
file try to handle this error by myself. the problem is that I can not get
previous url that user requested in my aspx page, I was thinking that
urlreferer property, but it does not work either. Does anybody has
experience on this issue before?

If I don't use that custom error page, do I have anyway to get control even
the file or directory specified in the request does not exist on my website?

Any suggestion will be appreciated.

Jason
 
G

Guest

I think you may try using javascript like this:
<input type="button" name="return" value="Prev" onClick="window.history.go(-1);">
 
J

Jason Zhou

Good point, but the problem is that I want to get the url instead of go
that url, according to internet sdk, this previous url is not exposed
for surity reason, so I still can not make it.

But thanks anyway!

Jason




*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top