title: How do I do a redirect an Ajax Post in a Controller's Action Method?
body: <p>I have an Ajax POST being sent to one of my Controller. e.g.</p>
  
  <p>Enquiry > Index.</p>
  
  <p>In the Index() Action, I return an ActionResult of JSON.</p>
  
  <p>As I am doing login checks, I do an if statement and if the activeUser's session token is null, I do a </p>
  
  <pre><code>return RedirectToAction("Index","Auth");
  </code></pre>
  
  <p>However, this is not redirecting properly but instead is returning the result in JSON which the browser complains about. </p>
  
  <p>How do I set a redirect properly such that if the IF statement fails, it will go to the login page but otherwise it will return the JSON results that I require?</p>