Die folgende meiner Seite nicht umleiten: Dies ist die MVC-Code:RedirectToAction funktioniert nicht nach erfolgreicher Jquery Ajax Post?
[HttpPost]
public ActionResult GoHome()
{
return RedirectToAction("Index", "Home");
}
die Ajax-Post hier ist:
$.support.cors = true;
$.ajax({
type: "POST",
url: "http://localhost/UserAccount/GoHome",
dataType: 'json',
crossDomain: true
});
Der Beitrag ist erfolgreich, und wenn es die Aktion GoHome hists tut es nicht Weiterleitung an die Indexaktion des Home Controllers.
'$ .support.cors = true;' ist nicht erforderlich. 'crossDomain: true' wird nicht benötigt. –