asp mvc分区项目 怎么直接运行后台
1个回答
展开全部
添加区域路由啊
public class ExampleManageAreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{
return "ExampleManage";
}
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
this.AreaName + "_Default",
this.AreaName + "/{controller}/{action}/{id}",
new { area = this.AreaName, controller = "Home", action = "Index", id = UrlParameter.Optional },
new string[] { "NFine.Web.Areas." + this.AreaName + ".Controllers" }
);
}
}
public class ExampleManageAreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{
return "ExampleManage";
}
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
this.AreaName + "_Default",
this.AreaName + "/{controller}/{action}/{id}",
new { area = this.AreaName, controller = "Home", action = "Index", id = UrlParameter.Optional },
new string[] { "NFine.Web.Areas." + this.AreaName + ".Controllers" }
);
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询