public class StructRazorViewEngine : RazorViewEngine
{
public StructRazorViewEngine()
: base()
{
//Area視圖路徑其中{
AreaViewLocationFormats = new[] {
//Area模版路徑
AreaMasterLocationFormats = new[] {
//Area的分部視圖路徑
AreaPartialViewLocationFormats = new[] {
//主視圖路徑
ViewLocationFormats = new[] {
//主模版路徑
MasterLocationFormats = new[] {
//主分部視圖路徑
PartialViewLocationFormats = new[] {
}
protected override IView CreatePartialView(ControllerContext controllerContext
{
return base
}
protected override IView CreateView(ControllerContext controllerContext
{
return base
}
protected override bool FileExists(ControllerContext controllerContext
{
return base
}
}
From:http://tw.wingwit.com/Article/program/net/201311/13965.html