title: HttpContext.Current.Request.Url.AbsolutePath with Master Page
body: <p>I am using HttpContext.Current.Request.Url.AbsolutePath as part of my security which the user needs to login before they access certain pages.</p>
  
  <p>In this example and it works great. The user has to sign in before they view their profile.</p>
  
  <pre><code>        if (Session["UserID"] == null)
          {
              Response.Redirect("Login.aspx/?ReturnURL=" + HttpContext.Current.Request.Url.AbsolutePath);
          }
  </code></pre>
  
  <p>The end result looks like this:</p>
  
  <pre><code>http://localhost:54324/Login.aspx/?ReturnURL=/Profile_Page.aspx
  </code></pre>
  
  <p>The issue I am having is the pages are part of the master page. When the redirect occurs to the login page, nothing on the master page works. The navigation links do not fire, the images show broken links, etc. However when I access the Login Page directly everything in the master page works fine.</p>