如何在.net mvc4的filter 中获取当前请求的Area
namespaceMvcMutilLang.Areas.Student{publicclassStudentAreaRegistration:AreaRegistrati...
namespace MvcMutilLang.Areas.Student
{
public class StudentAreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{
return "Student";
}
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"Student_default",
"{culture}/Student/{controller}/{action}/{id}",
new { action = "Index", id = UrlParameter.Optional }
);
}
}
}
这是MVC4中的Area路由注册,如何在filter中获得当前请求的AreaName 展开
{
public class StudentAreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{
return "Student";
}
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"Student_default",
"{culture}/Student/{controller}/{action}/{id}",
new { action = "Index", id = UrlParameter.Optional }
);
}
}
}
这是MVC4中的Area路由注册,如何在filter中获得当前请求的AreaName 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询