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

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

I have the following line in my view:

<%= Html.TextBoxFor(m => m.Description)%>
6条回答
  •  遇见更好的自我
    2021-02-01 02:55

    This worked for me for the one-offs, pretty verbose though:

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

提交回复
热议问题