I have created a project in asp.net mvc4 and set its View Engine to ASPX. Now, I want to change the View Engine to Razor. How to do that? I don't want to create a new project. I want to use existing project to change the View Engine. Can we change the View Engine from Properties or some how?
Should be as simple as
ViewEngines.Engines.Clear();
ViewEngines.Engines.Add(new RazorViewEngine());
Add it to Application_Start in global.asax.
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