title: Session variable remaining null
body: <p>I have an MVC project and in it I need to pass a variable between views. I'm trying to do this using a session variable but it stays null when I try to set it. What am I doing wrong? All of this code is in my controller.</p>
  
  <pre><code> public string searchQ
      {
          get { return (string)Session["searchQ"]; }
          set { Session["searchQ"] = ""; }
      }
  
      public ActionResult Index()
      {
          Session["InitialLoad"] = "Yes";
          return View();
      }
  
  
      [HttpPost]
      public ActionResult Index(string heatSearch)
      {
          ViewBag.SearchKey = heatSearch;
          searchQ= heatSearch;
          return View();
      }
  
  
  
      public ActionResult Index_Perm()
      {
          ViewBag.SearchKey = searchQ;
  
          return View();
      }
  </code></pre>
  
  <p>The goal is to pass that search key between the views.</p>