area的默认页:
routes.MapRoute(
name: "MyArea",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
namespaces: new[] { "MvcWeb.Areas.Members.Controllers" }
).DataTokens.Add("Area", "Members");
设置默认控制器:
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new { controller = "Login", action = "Index", id = UrlParameter.Optional }
);