It's my understanding that:
in debug mode, you can increase performance by removing support for view engines that you are not actually using (e.g. WebForms)
I'd like to do this for my application as the only view engine I use is Razor. How can I do this?
Removing the Web Form (ASPX) view engine We can remove all the view engines and add only Razor view engine by using Application_Start event of Global. asax. cs file like as: protected void Application_Start() { //Remove All Engine ViewEngines.
The View Engine in ASP.NET is used to translate our views to HTML and then render them to the browser. By default, ASP.Net supports ASPX and the Razor View Engine. The view engine templates have a different syntax than the implementation.
Place this in the Application_Start method in Global.asax.cs:
ViewEngines.Engines.Clear();
ViewEngines.Engines.Add(new RazorViewEngine());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With