I need to build a input text area with bootstrap styling and some HTML custom attributes. Here is my code:
@Html.EditorFor(model => model.Comments, new { style = "color: red; width: 400px", @class = "form-control", placeholder = "Enter detailed comments..."), type = "text" })
My model data comes from a viewmodel with the following data annotation:
[DataType(DataType.MultilineText)]
public string Comments{ get; set; }
Unfortunately this doesn´t work as I works if it´s a TextBoxFor. The EditorFor does not get styled, showing on sceen a plain small default HTML.
I wish to know how can I solve that ? I´m using MVC4 and I cannot move to MVC5.1 for now (it´s a requirement. I know MVC5.1 has some improvements on that area).