Reputation: 11
I'm in an action of CustomersController and I want to redirect to another action of a different controller.
I tried to use
RedirectToAction("ActionName", "ControllerName");
but it doesn't work! How can I do it ?
Additionally, how can I pass some parameters?
Upvotes: 0
Views: 275
Reputation: 34349
Ensure you are returning the result of RedirectToAction
return RedirectToAction("Action", "Controller", new { id = 5 });
Upvotes: 1