一般都是会改到区域开始.
//routes.MapRoute( // name: "Default", // url: "{controller}/{action}/{id}", // defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } //); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Hours", action = "Create", id = UrlParameter.Optional }, namespaces: new string[] { "Web.Areas.Hours.Controllers" } ).DataTokens.Add("Area", "Hour");
本文为博主原创文章,欢迎转载,但转载须注在明显位置注明【博客地址】和【原文地址】,否则将追究法律责任。http://www.cnblogs.com/cxd1008