Created
December 8, 2015 10:16
-
-
Save alantsai/7cdf8e78eddd51ecbf74 to your computer and use it in GitHub Desktop.
Asp .net Mvc - only include Razor View Engigne. From http://stackoverflow.com/questions/5912980/turning-off-the-webformviewengine-when-using-razor #asp.net-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