【发布时间】:2013-02-25 21:14:27
【问题描述】:
我正在 Visual Studio 2012 中开发一个 ASP.NET MVC4 应用程序。我也在使用 twitter 引导程序。
每当我生成一个新的 Controller 时,VS2012 都会自动为我生成默认的 CRUD 页面,这很好。
但是我已经厌倦了修改页面,以便按照引导程序需要的方式布置 DIV。
是否有 VS2012 插件可以帮助按照引导程序期望的方式生成这些视图?
这是一个由 VS2012 生成的示例 div。
<div class="editor-label">
@Html.LabelFor(model => model.Name)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Name)
@Html.ValidationMessageFor(model => model.Name)
</div>
..我会手动将其更改为...
<div class="editor-label control-group">
@Html.LabelFor(model => model.Name, new { @class = "control-label" })
<div class="editor-field controls">
@Html.EditorFor( model => model.Name, "CustomTemplate",
new { @class = "input-xlarge" })
@Html.ValidationMessageFor(model => model.Name)
</div>
</div>
【问题讨论】:
-
我是来问这个问题的;)
-
我也是来问这个问题的
标签: twitter-bootstrap asp.net-mvc-4 visual-studio-2012