如何在现有项目中将razor设置为默认视图引擎 [英] How to make razor the default view engine in existing project
本文介绍了如何在现有项目中将razor设置为默认视图引擎的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已将MVC 2项目升级到MVC3.如何在现有项目上将默认视图引擎设置为Razor?
I upgraded an MVC 2 project to MVC 3. How can I set the default view engine to Razor on an existing project?
对不起,我还不清楚.我想让剃刀"成为添加视图"对话框中的默认类型.
Sorry, I was rather unclear. I want to have Razor be the default type in the Add View dialog.
推荐答案
如果您的项目已经至少有一个Razor文件或者没有Aspx文件,则添加视图"对话框应默认为视图引擎组合框中的Razor选择.即完全没有视图文件的项目).您没有看到这种行为吗?
The Add View dialog should default to a Razor selection in the view engine combobox if your project has at least one Razor file already or if it has no Aspx files (i.e. a project with no view files at all). Are you not seeing that behavior?
这篇关于如何在现有项目中将razor设置为默认视图引擎的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文