473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Name of Previous Page

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
Dec 10 '07 #1
8 1276
Nevermind. I remembered Request.UrlReferrer

David
"David C" <dl*****@lifetimeinc.comwrote in message
news:OT**************@TK2MSFTNGP02.phx.gbl...
>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

Dec 10 '07 #2
"David C" <dl*****@lifetimeinc.comwrote in message
news:O9*************@TK2MSFTNGP02.phx.gbl...
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
ASP.NET MVP
http://www.markrae.net

Dec 10 '07 #3
Thanks Mark. What are the alternatives?

David
"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:eH*************@TK2MSFTNGP06.phx.gbl...
"David C" <dl*****@lifetimeinc.comwrote in message
news:O9*************@TK2MSFTNGP02.phx.gbl...
>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
ASP.NET MVP
http://www.markrae.net

Dec 10 '07 #4
"David C" <dl*****@lifetimeinc.comwrote in message
news:em**************@TK2MSFTNGP02.phx.gbl...
Thanks Mark. What are the alternatives?
Session variables would probably be the simplest...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Dec 10 '07 #5

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:eH*************@TK2MSFTNGP06.phx.gbl...
"David C" <dl*****@lifetimeinc.comwrote in message
news:O9*************@TK2MSFTNGP02.phx.gbl...
>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?

Dec 10 '07 #6
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]" <ma**@markNOSPAMrae.netwrote in message
BWnews:eH*************@TK2MSFTNGP06.phx.gbl...
BW>
>"David C" <dl*****@lifetimeinc.comwrote in message
news:O9*************@TK2MSFTNGP02.phx.gbl...
>>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...
BWWTF? really? why are they doing this?
BW>
Dec 10 '07 #7
"Barrie Wilson" <bw*****@nowhere.comwrote in message
news:13*************@corp.supernews.com...
"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:eH*************@TK2MSFTNGP06.phx.gbl...
>"David C" <dl*****@lifetimeinc.comwrote in message
news:O9*************@TK2MSFTNGP02.phx.gbl...
>>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.
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Dec 10 '07 #8
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.
"David C" <dl*****@lifetimeinc.comwrote in message
news:O9*************@TK2MSFTNGP02.phx.gbl...
Nevermind. I remembered Request.UrlReferrer

David
"David C" <dl*****@lifetimeinc.comwrote in message
news:OT**************@TK2MSFTNGP02.phx.gbl...
>>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


Dec 10 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Marcel | last post by:
Hello, I'm working on a search application for my website. The website contains a lot of pictures, and a search should return clickable thumbnails. No problems there. My problem started when I...
6
by: Mason A. Clark | last post by:
LAST WORD(s): 1. MSIE6 and Firefox will go to the top of the page on command <a href="#top">go upsy</a> even if there is NO name="top" or id="top" They know what a "top" is :-) Opera...
8
by: drillbit_99 | last post by:
I have an HTML page of thumbnail images. Each image can begin a slideshow of the images on the page by clicking on the image. This opens another HTML page that begins the slideshow using large...
2
by: KK | last post by:
In ASP.NET is it possible to get the name of the previous page? for example, Page1.aspx Page2.aspx From page1.aspx, I do a Server.Transfer(Page2.aspx), Now within Page2.aspx can I get the...
1
by: sri_san | last post by:
Hello, I am working on a website where I need to navigate to the previous page once the user clicks on "back" button. I store the previous page from the "HTTP_REFERER" Server variable and the...
2
by: David | last post by:
I need to be able to know what my web application's previous page name was so I can know the difference between 1st time in application for a page and when I am returning to this page from another...
1
by: Jeff | last post by:
I need to place a "Previous Page" link on every page within my site and a simple javascript:history.back() will not work because I need it to capture the state of the page when I left it. For...
6
by: karen987 | last post by:
I have a webpage called "topicview.asp" on a news website with ASP pages, it's a simple news publishing software. You add the news from the Admin section and all the details are stored in a...
13
by: staeri | last post by:
I use javascript:history.go(-1) to return to the previous page. I've now found out that when returning to the previous page all selections that the user made in dropdownlists are lost. How can...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.