在ASP.MVC 3,我如何指定一个多EditorFor
(文本域)的行和列?我正在使用[UIHint("MultilineText")]
,但找不到有关如何为文本区域添加属性的任何文档。如何在ASP.MVC中指定多行编辑器的列和行?
所需的HTML:
<textarea cols="40" rows="10"></textarea>
我的MVC 3型号的相关部分:
[UIHint("MultilineText")]
public string Description { get; set; }
我的剃须刀CSHTML的相关部分:
<div class="editor-field">
@Html.EditorFor(model => model.Description)
</div>
什么我得到的视图来源:
<div class="editor-field">
<textarea class="text-box multi-line" id="Description" name="Description"></textarea>
</div>
如何设置行和列?
当然!我想我是在过度思考问题。 – 2011-06-02 17:37:33