How to set the width of the text box when using Html.TextBoxFor

后端 未结 6 1281
走了就别回头了
走了就别回头了 2021-02-01 02:20

I have the following line in my view:

<%= Html.TextBoxFor(m => m.Description)%>
6条回答
  •  春和景丽
    2021-02-01 03:15

    You can attach it as an attribute. Try this:

    <%= Html.TextBoxFor(m => m.Description, new { style = "width:20em;" })%>

提交回复
热议问题