如何将MVC Areas中的某一个页设为起始页

area的默认页:

1 routes.MapRoute(
2        name: "MyArea",
3        url: "{controller}/{action}/{id}",
4        defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
5        namespaces: new[] { "MvcWeb.Areas.Members.Controllers" }
6    ).DataTokens.Add("Area", "Members");

设置默认控制器:

1 routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
2             routes.MapRoute(
3             "Default",
4             "{controller}/{action}/{id}",
5             new { controller = "Login", action = "Index", id = UrlParameter.Optional }
6             ); 

 

你可能感兴趣的:(如何将MVC Areas中的某一个页设为起始页)