This is a weird one. Probably painfully obvious. 😀
I have a View (let’s call it View0.aspx) that posts a form to a controller action (let’s call it Action1). Action1 runs and then returns RedirectToAction("Action2"), which in turn returns View("View2").
Running it in the debugger, everything looks great (Action2 breakpoint gets hit). The problem is, it never loads View2.aspx. View0.aspx stays there. I even see the HTTP request for the route that calls Action2, but View2 never loads. I don’t even get a refresh Any ideas?
Source below:
[AcceptVerbs("POST")]
public ActionResult Action1()
{
// Run action code
return RedirectToAction("Action2");
}
public ActionResult Action2()
{
// run action code
return View("View2");
}
I just found the issue. I was doing an Ajax post, which explains why it wasn’t redirecting. I switched it over to a normal post and it worked. Also, I just noticed a few errors in my OP, which I’m about to fix. Sorry about the confusing post.