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
One option seems to be using CSS to style the textarea
.multi-line { height:5em; width:5em; }
See this entry on SO or this one.
Amurra's accepted answer seems to imply this class is added automatically when using EditorFor but you'd have to verify this.
EDIT: Confirmed, it does. So yes, if you want to use EditorFor, using this CSS style does what you're looking for.