Name of Previous Page

  • Thread starter Thread starter David C
  • Start date Start date
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
 
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...
 
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...
 
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?
 
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>
 
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.
 
Back
Top