Last active
August 3, 2016 10:38
-
-
Save SauliusSun/5c6f3dd573f41347ac15 to your computer and use it in GitHub Desktop.
ASP.NET MVC register only Razor view engine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void Application_Start() | |
{ | |
AreaRegistration.RegisterAllAreas(); | |
RouteConfig.RegisterRoutes(RouteTable.Routes); | |
// remove all view engines registered in application | |
ViewEngines.Engines.Clear(); | |
// add Razor view engine | |
ViewEngines.Engines.Add(new RazorViewEngine()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment