我有我的看法如下一行:
I have the following line in my view:
<div class="editor-field">
<%= Html.TextBoxFor(m => m.Description)%>
</div>
我如何定义文本框的宽度?
How do I define the width of the text box?
一个可重复使用的解决方案是设置宽度在CSS文件
A reusable solution is to set the width in your css file
.wide
{
width: 300px;
}
然后将其设置使用上述
then set it using the markup above
<%= Html.TextBoxFor(m => m.Description, new { @class= "wide" })%>