Take the 2-minute tour ×

In a Action, I am calling

RedirectToAction("login", new { test = "1" });

And the page doesn't seem to be redirecting. The action "login" is in the same controller.

What could the issue be?

share|improve this question
Your returning RedirectToAction(...) right, not "calling" it? –  mxmissile Sep 9 '09 at 14:43

3 Answers 3

up vote 20 down vote accepted

You should use

return RedirectToAction(...
share|improve this answer

RedirectToAction(... will not work if you are using AJAX form. ajax request simply ignore the redirect call

share|improve this answer
agree with you, you would need to do the redirection on the client side on success of ajax post (for example); by using jquery or javascript. @jawahar –  t_plusplus Apr 16 at 14:48
Good catch. Was wondering why my form didn't redirect. –  Noobgrammer Sep 25 at 7:19

You have to use return the RedirectToAction.

share|improve this answer

Your Answer


