public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Login", id = UrlParameter.Optional}, namespaces:new string[]{"MVCUI.Areas.自己Area的名称.Controllers"} ).DataTokens.Add("Area","自己Area的名称"); }
原文:http://www.cnblogs.com/shenyixin/p/4991452.html