How to determine when a page is being redirected

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I would like to know if there is an event that will tell me when a page is
being redirected and also the url of where the page is being redirected.
Is there an event that is fired which will give me this information.

Note: I want to use this event to remove a session variable.

Thanks in advance
 
if not Page.isPostBack then
' the page came from a link, not from a Postback in the same page
end if


to see what was the previous page link, just use session variables
( http://www.filtrarte.com/sessions.asp )
the PATH_INFO give's you the page, just have a session called
session("PageInfo") and set it in the Master page
like session("PageInfo") = request.serverVariables("PATH_INFO")

then when you get inside the not Page.isPostBack if
you can always see if that session has something and what it is
if is nothing then the user reach there for the first time (external link)
else the user came from your website and you know from witch page

hope it helps

--

Bruno Alexandre
København, Danmark

"a portuguese in Denmark"
 
Yes, I know about IsPostBack,
but I want to know when a page is Unloaded
or "being" redirected to another page.

How do I check for this?
 
the same thing applies !

Protected Sub Page_Unload(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Unload

End Sub


--

Bruno Alexandre
København, Danmark

"a portuguese in Denmark"
 
Obrigado Bruno.

Bruno Alexandre said:
the same thing applies !

Protected Sub Page_Unload(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Unload

End Sub


--

Bruno Alexandre
København, Danmark

"a portuguese in Denmark"
 
Back
Top