Losing context from JQuery post with ASP.Net MVC
Posted
by Dan
on Stack Overflow
See other posts from Stack Overflow
or by Dan
Published on 2010-04-25T07:58:40Z
Indexed on
2010/04/25
8:03 UTC
Read the original article
Hit count: 238
jQuery
|asp.net-mvc
I have a JQuery dialog box on a page that calls something like this:
$.post("/MyController/MyAction", { myKey: key} //...
And this successfully gets here:
[HttpPost]
public ActionResult MyAction(int myKey)
{
//do some stuff
return RedirectToAction("AnotherAction");
}
The problem is that the RedirectToAction has no effect on the webbrowser. I am guessing this is because the JQuery post is kinda on a different 'tread' so it doesn't know where to send the response? How do I get the browser to load the new response?
© Stack Overflow or respective owner