public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute(name: "routeArea", url: "{controller}/{action}/{id}", defaults: new { controller = "Login", action = "Index", id = UrlParameter.Optional }) .DataTokens = new RouteValueDictionary(new { area = "Login" }); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); } }
标签:Asp,默认设置,routes,controller,Mvc,action,new,id From: https://www.cnblogs.com/litianfeng-net/p/16657038.html