Asp.net Mvc 区域路由默认设置
作者:互联网
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 } ); } }
标签:Index,Asp,默认设置,routes,controller,Mvc,action,new,id 来源: https://www.cnblogs.com/litianfeng-net/p/16657038.html