Asp.net MVC 默认启动区域控制器

public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            
            routes.MapRoute(
                name: "_Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Login", action = "Index", id = UrlParameter.Optional }
                , namespaces: new string[] { "ZY.Controllers.Admin" }
            ).DataTokens.Add("Area", "Admin");
        }

  

posted @ 2020-11-14 10:50  changsen-  阅读(263)  评论(0编辑  收藏  举报