My web application immediately redirects users to a login page via web.config. How can I get the url that requested my page? I tried using the Request paramaters in Page_Load of the Login.aspx page but that didn't work.
I found the answer to what I was looking for by using UrlReferrer. See below.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Request.UrlReferrer.ToString <> "" Then
Session("PageUrl") = Request.UrlReferrer.ToString
End If
End Sub