Thursday, May 6, 2010

ViewLocationFormats (just code hint)

To use standard engine but searching in modified (extended) list of locations: protected void Application_Start() { ViewEngines.Engines.Clear(); ViewEngines.Engines.Add(new WebFormViewEngine() { ViewLocationFormats = new[] { "~/MYEXTRALOCATION/Views/{1}/{0}/Form.aspx", "~/Views/{1}/{0}.aspx", "~/Views/{1}/{0}.ascx", "~/Views/Shared/{0}.aspx", "~/Views/Shared/{0}.ascx" }, }); RegisterRoutes(RouteTable.Routes); }

No comments:

Post a Comment