Is it possible to Response.Redirect in aspx that returns a view from MVC?
I have an login.aspx page that i need upon successful login to redirect to a view in ~/Vie
Here is how I redirect from .aspx
to an MVC view:
var page = HttpContext.Current.Handler as Page;
Response.Redirect(page.GetRouteUrl("yourRouteNameOrDefault",
new { Controller="Home", Action="Index"}), false);
Keeps you from hard-coding in the actual path and instead uses your routing and also allows you to build in routeParameters
.