我需要编辑 Views/Shared/EditorTemplates/Boolean.cshtml
文件在我的 C# 程序中将 Boleanan 显示为是或否,而不是真或假。但是,缺少此文件和文件夹(EditorTemplates/Boolean.cshtml)。
我正在使用Visual Studio 2010 mvc3,但它没有为我创建此文件夹或文件。
默认情况下,我的共享文件夹中只有_layout.csthml,_logonPartial.cshtml和Error.cshtml
如何让Visual Studio构建这些文件?
您可以自己添加文件夹并覆盖默认的布尔编辑器模板。请务必将文件命名为Boolean.cshtml
并声明相应的模型:
@model Boolean
// Your html/code for your editor template