Created
December 20, 2012 04:25
-
-
Save derekgates/4342960 to your computer and use it in GitHub Desktop.
Disable Razor engine in MVC
This file contains hidden or 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
public class Global : HttpApplication | |
{ | |
public void Application_Start() | |
{ | |
// Clears all previously registered view engines. | |
ViewEngines.Engines.Clear(); | |
// Registers our Razor C# specific view engine. | |
// This can also be registered using dependency injection through the new IDependencyResolver interface. | |
ViewEngines.Engines.Add(new RazorViewEngine()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment