-1

I have a few textboxes that work great with the HtmlEditFor (single line) but I have been asked to make the text-input-box larger for one of the inputs. How can I acheive this??

I want 6-8 lines. Currently my code looks something like this:

@Html.EditorFor(model => model.Message, new { htmlAttributes = new { @class = "form-control" } })

tereško
  • 58,060
  • 25
  • 98
  • 150

2 Answers2

0
@Html.TextAreaFor(model => model.Message, 10, 55, null)

10 is the number of rows and 55 is the number of columns.

Ori Lentz
  • 3,668
  • 6
  • 22
  • 28
0
        [DataType(DataType.MultilineText)]

Putting this over the inputs property in the model would allow for a larger box that can be manually rescaled.