Hi all
I am using the following code to get the name of the previous page that the user visited:
I am using the following code to get the name of the previous page that the user visited:
Code:
Private Function GetPreviousURL() As String
Dim script As String = Nothing
script &= "<script language=JavaScript id=previous>" & vbCrLf
script &= "document.referrer;" & vbCrLf
script &= "</script>" & vbCrLf
Verify script has not already been registered.
If Not ClientScript.IsStartupScriptRegistered("previous") Then
Register the script.
ClientScript.RegisterStartupScript(Page.GetType, "previous", script)
End If
End Function
[code]
My only problem is that I am unsure as to how to get the value generated by document.referrer back to a vb.net variable. Any suggestions?
Mike55.