title: Redirecting to another page in ASP.NET MVC using JavaScript/jQuery
body: <p>I want to redirect from one page to another page in ASP.NET MVC 3.0 using JavaScript/jQuery/Ajax. On button click event I have written JavaScript code like below.</p>
  
  <pre><code>function foo(id)
  {
      $.post('/Branch/Details/' + id);
  }
  </code></pre>
  
  <p>My controller code is like this:</p>
  
  <pre><code>public ViewResult Details(Guid id)
  {
       Branch branch = db.Branches.Single(b =&gt; b.Id == id);
       return View(branch);
  }
  </code></pre>
  
  <p>When I click on a button it is calling the Details action inside  BranchController, but it doesn't return to the Details view.</p>
  
  <p>I didn't get any error or exception. It's showing status 200 OK in <a href="http://en.wikipedia.org/wiki/Firebug_%28software%29">Firebug</a>. What is wrong in my code and how can I redirect to the Details view page?</p>