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?
Asked
Active
Viewed 3,445 times
1 Answers
9
Should be as simple as
ViewEngines.Engines.Clear();
ViewEngines.Engines.Add(new RazorViewEngine());
Add it to Application_Start in global.asax.

Hanno
- 1,017
- 11
- 18
-
Thanks alot. I'll check whether it helps. – Pearl May 15 '13 at 11:45