Finding referring page name? 
Author Message
 Finding referring page name?

Hi all,

This is just {*filter*}, but does anyone know a way to find out (maybe from the
response or request object) what page referred the request...

For example...

in Page1.asp
  Response.Redirect("Page2.asp")

then in Page2.asp
  Response.Write("You came here via " & ... Response.ReferringPage? ...)

Thanks again
Dave



Tue, 16 Jul 2002 03:00:00 GMT  
 Finding referring page name?
Dave,

There are several different ways to do this. A couple are:

1. Look up Request.ServerVariables("HTTP_REFERER")

2. In your page1.asp set a session variable - Session("OldUrl") =
"Page2.asp"
        Then in Page2.asp Response.Write("You came here via " & ...
Response.Write Session("OldUrl")

Hope it helps,

Kevin W. Miller

Quote:

>Hi all,

>This is just {*filter*}, but does anyone know a way to find out (maybe from
the
>response or request object) what page referred the request...

>For example...

>in Page1.asp
>  Response.Redirect("Page2.asp")

>then in Page2.asp
>  Response.Write("You came here via " & ... Response.ReferringPage? ...)

>Thanks again
>Dave



Tue, 16 Jul 2002 03:00:00 GMT  
 Finding referring page name?
Thanks Kevin

I think I will go with the session variable as the user is being passed
around several pages before ending up where I need them to be and the
HTTP_REFERRER only gives the url of the last page that they actually stopped
at (rather than just being redirected on).

However, the 2nd method works fine for this...

Thanks again
Dave

PS. I just want to thank everyone who replies to my messages by the way... I
know I am asking a lot of questions recently and I thank everyone who is
replying to them... I am quite new to all this multi-tier and web
development stuff and am still in the process of learning so thanks for
being patient... Also there is noone else here that I can ask, I am the
entire web development department :)



Quote:
> Dave,

> There are several different ways to do this. A couple are:

> 1. Look up Request.ServerVariables("HTTP_REFERER")

> 2. In your page1.asp set a session variable - Session("OldUrl") =
> "Page2.asp"
>         Then in Page2.asp Response.Write("You came here via " & ...
> Response.Write Session("OldUrl")

> Hope it helps,

> Kevin W. Miller


> >Hi all,

> >This is just {*filter*}, but does anyone know a way to find out (maybe from
> the
> >response or request object) what page referred the request...

> >For example...

> >in Page1.asp
> >  Response.Redirect("Page2.asp")

> >then in Page2.asp
> >  Response.Write("You came here via " & ... Response.ReferringPage? ...)

> >Thanks again
> >Dave



Wed, 17 Jul 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Page Footer on Page 1 Refers to Page 2

2. Determining referring domain name

3. Referring to named objects

4. How do I refer to an element of a collection by NAME with a variable

5. Finding Last name in a Full Name string.

6. File name or class name not found during Automation operation

7. Refer to Me![control-name] in MsgBox

8. Referring to Field Names with Variables

9. How to refer to current form item name?

10. Referring to a control by a generic name

11. Can I refer forms by name ?

12. How do I refer to VB objects by name

 

 
Powered by phpBB® Forum Software