How to use RedirectToRoute(“routeName”) in MVC?
问题 I am just puzzled on why is my RedirectToRoute() method not working. I have a RouteConfig.cs file like this routes.MapRoute( "pattern1", "{action}", new { controller = "Home", action = "About" } ); routes.MapRoute( "pattern2", "{controller}/{action}/{id}", new { controller = "Admin", action = "Index", id = UrlParameter.Optional } ); on this configuration my default controller Home and action About is getting called, now in the action method I am calling RedirectToRoute() with the following