Skip to content

Instantly share code, notes, and snippets.

@derekgates
Created December 20, 2012 04:25
Show Gist options
  • Save derekgates/4342960 to your computer and use it in GitHub Desktop.
Save derekgates/4342960 to your computer and use it in GitHub Desktop.
Disable Razor engine in MVC
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