Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

Name of Previous Page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David C - 10 Dec 2007 14:01 GMT
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
David C - 10 Dec 2007 15:32 GMT
Nevermind. I remembered Request.UrlReferrer

David
>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
Mark Rae [MVP] - 10 Dec 2007 16:21 GMT
> 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...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

David C - 10 Dec 2007 17:37 GMT
Thanks Mark.  What are the alternatives?

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...
Mark Rae [MVP] - 10 Dec 2007 17:46 GMT
> Thanks Mark.  What are the alternatives?

Session variables would probably be the simplest...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Barrie Wilson - 10 Dec 2007 19:01 GMT
>> 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...

WTF?  really?  why are they doing this?
Michael Nemtsev [MVP] - 10 Dec 2007 21:03 GMT
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> "Mark Rae [MVP]" <mark@markNOSPAMrae.net> wrote in message
BW> news:eH8A4i0OIHA.484@TK2MSFTNGP06.phx.gbl...
BW>

>>> 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...

BW> WTF?  really?  why are they doing this?
BW>
Mark Rae [MVP] - 10 Dec 2007 21:13 GMT
>>> 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...
>
> WTF?  really?  why are they doing this?

Yes.

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

George Ter-Saakov - 10 Dec 2007 22:07 GMT
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.

> Nevermind. I remembered Request.UrlReferrer
>
[quoted text clipped - 5 lines]
>>
>> David

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.