title: redirect to action using jquery post
body: <p>im using MVC3. im trying to redirectToAction after doing a jquery post.</p>
  
  <p>edit: sorry for not  being specific. Whenever it reaches the return RedirectToAction, it just refreshes the same page and returns to the same current view. </p>
  
  <p>my View code is as follows:</p>
  
  <pre><code> $("button[name='command']").click(function () {
  
          var checked_status = null;
          if ($("#select_all").is(':checked')) {
              checked_status = true;
          } else {
              checked_status = false;
          }
  
          $.post('@Url.Action("SaveInvitations", "Contractors")',
                {
                    command: $(this).val(),
                    selectedContractors: $("input[name='selectedContractors']:checked").map(function () { return $(this).val(); }).get().join(","),
                    page: $(".selected").text(),
                    CheckedAll: checked_status
                });
      });
  </code></pre>
  
  <p>and my controller has the following:</p>
  
  <pre><code>        if (command == "skip")
          {
              TempData["message"] = string.Format("No contractors where selected");
              RedirectToAction("Index", "Home");
          }
          else
          {
  ...
  TempData["message"] = string.Format("The invitations have been send successfully.");
                  Session["subModel"] = null;
                  return RedirectToAction("Index", "Home");
  }
  </code></pre>
  
  <p>Then again, im just trying to do a redirectToAction after a jquery $.post. What do I have to do to make it work?</p>