title: How to display message before redirecting to another page?
body: <p>I have a problem... I have registration form and when user has registred it redirect him to Home page..i want to display popup message before redirecting him that he is successfuly registred and then redirect him to Home page. </p>
  
  <p>Controller:</p>
  
  <pre><code>  TempData["SuccessMessage"] = "A confirmation email will be sent to the address you've entered shortly";        
    return RedirectToAction("Index", "Home");
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>&lt;script&gt;
   if (@TempData["SuccessMessage"] != null)
    {
      alert('@TempData["SuccessMessage"]');
    }
  &lt;/script&gt;
  </code></pre>