Name of Previous Page

D

David C

I have an ASP.Net web page that I want to be able to retrieve the name of
the previous page as I am coming to this page from 3 different aspx pages
via PostBackURL string. I looked at the PreviousPage but it has no "Name"
property that I could find. Can anyone help? Thanks.

David
 
M

Mark Rae [MVP]

Nevermind. I remembered Request.UrlReferrer

Don't rely on this 100%, especially if your site is on the public Internet,
as more and more ISPs are stripping it off HTML headers...
 
D

David C

Thanks Mark. What are the alternatives?

David
Mark Rae said:
Don't rely on this 100%, especially if your site is on the public
Internet, as more and more ISPs are stripping it off HTML headers...
 
B

Barrie Wilson

Don't rely on this 100%, especially if your site is on the public
Internet, as more and more ISPs are stripping it off HTML headers...

WTF? really? why are they doing this?
 
M

Michael Nemtsev [MVP]

Hello Barrie,

just reduce unnecessary info for optimization

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


BW> BW> BW> WTF? really? why are they doing this?
BW>
 
G

George Ter-Saakov

Do not use Request.UrlReferrer

Sometimes when referred urls are emails (or simply populated with garbage)
Request.UrlReferrer will blow up since it's trying to return URI object.

instead use Response.ServerVariables["HTTP_REFERER"]; it will return a
string


George.
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top