who called this page?

who called this page?

Post by James Cook » Fri, 14 Mar 2003 02:36:04



I want to redirect to the page that originally called this one.
how?

Thanks,
James

 
 
 

who called this page?

Post by Kevin Spence » Fri, 14 Mar 2003 03:33:15


You would have to persist the URL of the calling page somewhere over the
lifetime of the current page, as it may PostBack to itself many times. How
would I do this? In my Page_Load Sub, I would do something like the
following:

If not Page.IsPostBack
    ViewState("REFERER") = Request.ServerVariables("HTTP_REFERER")
End If

Then you can fetch ViewState("REFERER") at any time in the life of the page.

HTH,

Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
http://www.takempis.com
Different Strangs fer Different Thangs.


Quote:> I want to redirect to the page that originally called this one.
> how?

> Thanks,
> James


 
 
 

1. Finding out what page used Server.Transfer to call current page

If I have four pages, and page A can Server.Transfer to page B or C, and
page B and C can both Server.Transfer to page D, how can page D find out
whether it was page B or C that used Server.Transfer to get there?

Is there a clean way of doing this?  I.e., is there some property or
variable or method that would directly give this to me?  I don't want to do
it by way of error handling code, query strings, or session state; these are
straight forward, but not preferable.

Reece

2. Return big DataTables from COM+ comp

3. Calling Codebehind page functions from my Aspx page??....

4. Duo shutdown problem

5. returning to prevoiusly called web page

6. newbie xsltproc help needed

7. Call ASP page.

8. ASPI Kills Win XP - Adrian Miller (cRoxio) (repost by popular demand)

9. return to previous called web page

10. Grid's ItemCommand being called on page refresh

11. Calling ASPX Page from ASP

12. Who called my Page?

13. Calling ASP.NET pages from other version of ASP pages in IIS 5