使用的HtmlHelper创建文本区域:ASP .NET MVC 4 在我的网页之一,我需要一个textarea的具有一定的宽度和高度使用HTML 辅助类。我的一些代码下面给出:与ASP.NET的MVC 4
<div class="editor-label">
@Html.LabelFor(model => model.MailSubject)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.MailSubject)
@Html.ValidationMessageFor(model => model.MailSubject)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.MailBody)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.MailBody)
@Html.ValidationMessageFor(model => model.MailBody)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.Content)
</div>
<div class="editor-field1">
@Html.EditorFor(model => model.Content)
@Html.ValidationMessageFor(model => model.Content)
</div>
我想知道我如何定义大小editorfor(model.content)的(宽度/隐藏)?
http://stackoverflow.com/questions/5119221/how-can-i-change-the-size-of-a-multi-line-editor -field –
你需要编辑器的高度来设置?或者你需要使用textarea并设置其高度和宽度? –
@AliRızaAdıyahşi,谢谢。可以定义列/行可以响应? –