We can customize view engines in ASP.NET MVC application.
If you are not using any view engine like ASPX View Engine, better you remove it to improve the performance, it is one of the MVC performance tuning tips from the bunch.
Removing the Web Form view engine is easy in MVC. We can remove all the view engines and add only Razor view engine by using Application_Start event of Global.asax.cs file like below.
If you are not using any view engine like ASPX View Engine, better you remove it to improve the performance, it is one of the MVC performance tuning tips from the bunch.
Removing the Web Form view engine is easy in MVC. We can remove all the view engines and add only Razor view engine by using Application_Start event of Global.asax.cs file like below.
- protected void Application_Start()
- {
- //Remove All Engine
- ViewEngines.Engines.Clear();
- //Add Razor Engine
- ViewEngines.Engines.Add(new RazorViewEngine());
- ...
- }
NOTE:
- After removing Web Form engine, Razor View Engine will be almost twice as fast with the Web Form engine.
- Use this when you are sure that you will use only Razor views. It will be helpful to you.
- If you are using both type of views (ASPX & Razor), don't implement this.
You can also customize the view engines. for more click
ReplyDeleteThis is very important and imformative blog,thanks for good info
.Net Online Training
Thanks for the informative article. This is one of the best resources I have found in quite some time. Once Again Thanks for Sharing this Valuable Information i like this i Can Share this with My Friend Circle.
ReplyDeleteASP.NET Interview Questions and Answers
ReplyDeleteHi Your Blog is very nice!!
Get All Top Interview Questions and answers PHP, Magento, laravel,Java, Dot Net, Database, Sql, Mysql, Oracle, Angularjs, Vue Js, Express js, React Js,
Hadoop, Apache spark, Apache Scala, Tensorflow.
Mysql Interview Questions for Experienced
php interview questions for freshers
php interview questions for experienced
python interview questions for freshers
tally interview questions and answers
codeingniter interview questions
cakephp interview questions
express Js interview questions
react js interview questions
laravel Interview questions and answers
Very nice post with lots of information. Thanks for sharing this updates.
ReplyDeleteBlue Prism Training Chennai
Blue Prism Training Institute in Chennai
UiPath Training in Chennai
Data Science Training in Chennai
RPA course in Chennai
RPA Training Institute in Chennai
Blue Prism Training in Anna Nagar
Blue Prism Training in T Nagar