title: ASP.NET C# Cookie not keeping information after "Sign In Through Steam"
body: <p>Working with cookies is quite new to me. I am creating a website in ASP.NET using C# as the code behind. I have a sign in through steam button which works perfectly. However, when the user has clicked sign in through steam, I want the user to be redirected to the page that they were on when they clicked the button. I have tried to do this through the use of cookies.</p>
  
  <p>ASPX</p>
  
  <pre><code>&lt;li runat="server" id="login"&gt;
      &lt;a onserverclick="LoginRedirect" runat="server"&gt;Sign In With Steam&lt;/a&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>Navigation Bar in Master File C#</p>
  
  <pre><code>protected void LoginRedirect(Object sender, EventArgs e)
  {
      HttpCookie PageBeforeAuthCookie = new HttpCookie("PageBeforeAuthCookie");
      PageBeforeAuth = HttpContext.Current.Request.Url.AbsolutePath;
      PageBeforeAuthCookie.Value = PageBeforeAuth;
      Response.Cookies.Set(PageBeforeAuthCookie);
      Response.Cookies.Add(PageBeforeAuthCookie);
      Response.Redirect("login.aspx");
  }
  </code></pre>
  
  <p>Login Page C#</p>
  
  <pre><code>if(Request.Cookies["PageBeforeAuthCookie"].Value != null)
  {
      PageRedirUrl = Response.Cookies["PageBeforeAuthCookie"].Value;
  }
  else
  {
      PageRedirUrl = "services.aspx";
  }
  Response.Redirect(PageRedirUrl);
  </code></pre>
  
  <p>After I have signed in through steam successfully, I am thrown an exception with these details: <code>System.ArgumentNullException: Value cannot be null.</code> for the line <code>Response.Redirect(PageRedirUrl);</code></p>