저는 광산 프로젝트에서 스파크가있는 영역을 사용하고 있습니다.
AreaRegistration.RegisterAllAreas();
나는 내 영역 뷰 "관리자"라는 이름의 폴더에있는 다음의 Global.asax 호출에서 다음
public class AdminAreaRegistration : System.Web.Mvc.AreaRegistration
{
public override string AreaName
{
get { return "Admin"; }
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"Admin_default",
"Admin/{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
과 : 내가해야 할 일을했을 모두 같은 각 영역에 대한 AreaRegistration 클래스를 추가했다 그 아래 적절한 컨트롤러 폴더와 기본 "보기"폴더 아래 :
\MvcProject
\Views
\Admin
\Home
\Index.spark
\Users
\Index.spark
페이지에서 당신은 연결 :
,
AreaDescriptorFilter 그래서 당신은 스스로를 추가하는 방법에 대해 걱정할 필요가 없습니다 기본
으로 추가됩니다.