What's the difference in ASP.NET MVC of RedirectToRoute and RedirectToAction?
Redirect to route looks up the route table thats defined in global.asax and redirect to action redirects you to a specified controller/action.
that's about it really
RedirectToRoute means it redirects to a specific URL which is defined in routing API.(Global.asax)
RedirectToAction will return a http 302 response to the browser and then browser will make GET request to specified action.
Ideally I would use RedirectToRoute
for Action Links/Images
and RedirectToAction
in Controller's Action
to redirect to another Controller's Action
.