title: ASP.NET Session variable becomes null?
body: <p>My solution explorer (if helps):
  <a href="http://i.stack.imgur.com/BdhDz.png" rel="nofollow">http://i.stack.imgur.com/BdhDz.png</a></p>
  
  <p>When i click on account button(with href to account.aspx), it redirects me to login.aspx because not authorised.</p>
  
  <p>on my login.aspx.cs(after they click login), i have</p>
  
  <pre><code>Session["hi"] = "hello";
  HttpCookie cookie = new HttpCookie("username");
  cookie.Value = UName.Text;
  Response.Cookies.Add(cookie);
  System.Web.Security.FormsAuthentication.RedirectFromLoginPage(UName.Text, false);
  </code></pre>
  
  <p>on the account.aspx.cs i have </p>
  
  <pre><code>if (Session["hi"] != null)
  {
      Literal1.Text = Session["hi"].ToString();
      Literal1.Text += "&lt;br&gt;&lt;br&gt;&lt;br&gt;";
  }
  </code></pre>
  
  <p>Why does it not show anything? I tried all sorts of ways to display this session, didnt work,
  for some reason Session["hi"] is null.</p>