router,test,

RegisterRoutes(RouteTable.Routes);

routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
)//.DataTokens.Add("area", "Admin"); ;
;

 

 

 

//AreaRegistration.RegisterAllAreas();

 

public class x1AreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{
return "x1";
}
}

public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"x1_default",
"x1/{controller}/{action}/{id}",
new { action = "Index", id = UrlParameter.Optional }
);
//.DataTokens.Add("area", "Admin");
}
}

posted @ 2018-07-10 10:54  以函  阅读(97)  评论(0编辑  收藏  举报