ASP.NET MVC: What is the correct way to redirect to pages/actions in MVC?
- by Mark Redman
I am fairly new to MVC but not sure exactly which Redirect... replaces the standard redirect used in WebForms ie the standard Response.Redirect()
For instance, I need to redirect to other pages in a couple of scenarios:
1) WHen the user logs out (Forms signout in Action) I want to redirect to a login page
2) In a Controller or base Controller event eg Initialze, I want to redirect to another page (AbsoluteRootUrl + Controller + Action)
It seems that multiple redirects get called in some cases which causes errors, something to do with the fact a page is already being redirected? How can cancel the current request and just redirect?