Ich habe ein JQuery-Bestätigungs-Popup mit Ja, Nein-Schaltflächen. Die Ja-Taste ruft diese Funktion:JQuery ruft die Aktion auf dem Controller auf (aber nicht nach)
function doStuff() {
$('#confirmPopup').dialog("close");
var someKey = $("#someKey")[0].value;
$.post("/MYController/MyAction", { someKey : someKey },
function(responseText, textStatus, XMLHttpRequest) {
});
return false;
}
Diese erfolgreich ruft mein Controller-Aktion (2 verschiedene Versuche):
public ActionResult MyAction(int someKey)
{
//do stuff
return RedirectToAction("OtherAct", "OtherCont");
}
public JavaScriptResult MyAction(int someKey)
{
//do stuff
return JavaScript("Window.location.href='OtherCont/OtherAct';");
}
In beiden Fällen wird die Aktion ausgeführt wird, aber wieder direkt auf die andere Aktion tut nicht vorkommend. Warum?