protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); // [CsQuery] The following code must be added to enable to CsQuery engine ViewEngines.Engines.Clear(); var engine = new CsQueryViewEngine(); engine.LayoutControllerType = typeof(Controllers.LayoutController); ViewEngines.Engines.Add(engine); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); // [CsQuery] The following code must be added to enable to CsQuery engine ViewEngines.Engines.Clear(); ViewEngine = new CsQueryViewEngine(); ViewEngine.LayoutControllerType = typeof(Controllers.LayoutController); ViewEngine.Options = ViewEngineOptions.EnableScriptManager; ViewEngine.LibraryPath.Add("~/scripts/libs"); ViewEngine.LibraryPath.Add("~/scripts/libs2"); ViewEngines.Engines.Add(ViewEngine); }