title: How to pass parameter to another page by TempData in ASP.NET MVC framwork?
body: <p>I want to Redirect from a page to another page without showing parameter on the url.</p>
  
  <p>some articles say that "TempData is stored in the session and will be automatically removed at the end of the first request." recommand me to use TempData to transfer parameter, but it's not working so fine for me.</p>
  
  <p>As you can see, this is a totally new testing project without any other noise, after <code>TempData["test"] = "testString"</code> executed, when I look into TempData, it has keys count and values count equal to 1,</p>
  
  <p>but after <code>RedirectToAction("About")</code> has been executed, <code>TempData["test"]</code> has only both 0 count of keys and values.</p>
  
  <pre><code>public IActionResult Index()
  {
      TempData["test"] = "testString";
      return RedirectToAction("About"); 
      //return View("About", test); // this will show parameter on the url
  }
  
  public IActionResult About()
  {
      string test = (TempData["test"] == null) ? "isNull" : TempData["test"].ToString();
      return View();
  }
  </code></pre>
  
  <p>I've tried .Netframwork 4.5 and .Netframwork 4.8.</p>
  
  <p>Actually, It works in Edge, and neither Chrome, Firefox or Opera does on my computer. But it works on my friend's computer in Chrome, we are confusing with these results.</p>