How do I specify the columns and rows of a multiline Editor-For in ASP.MVC?

后端 未结 7 1988
梦毁少年i
梦毁少年i 2020-12-08 12:42

In ASP.MVC 3, how do I specify the columns and rows for a multiline EditorFor (textarea)? I am using [UIHint(\"MultilineText\")], but can\'t find a

相关标签:
7条回答
  • 2020-12-08 13:39

    In .net VB - you could achieve control over columns and rows with the following in your razor file:

    @Html.EditorFor(Function(model) model.generalNotes, New With {.htmlAttributes = New With {.class = "someClassIfYouWant", .rows = 5,.cols=6}})
    
    0 讨论(0)
提交回复
热议问题