【问题标题】:Add rows to @html.Textarea [duplicate]将行添加到@html.Textarea [重复]
【发布时间】:2014-04-28 19:09:00
【问题描述】:

如何向这个助手添加行:

 @Html.TextAreaFor(x => Model.xxx[i].xxx,  htmlAttributes:  new { @class = "form-control" })

好像默认是2行,我想加进去。

【问题讨论】:

    标签: c# asp.net-mvc


    【解决方案1】:

    使用rows属性

    new { @class = "form-control", rows = "10" } 
    

    用你想要的行数更改10

    【讨论】:

      猜你喜欢
      • 2019-01-28
      • 2018-07-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-19
      • 2021-12-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多