I have a JQuery confirmation popup, with Yes, No buttons. The Yes button calls this function:
function doStuff() {
$('#confirmPopup').dialog("close");
var someKey = $("#someKey")[0].value;
$.post("/MYController/MyAction", { someKey : someKey },
function(responseText, textStatus, XMLHttpRequest) {
});
return false;
}
This successfully calls my controller action(2 different attempts):
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 both cases the action gets executed, but re-direct to the other action does not occure. why?