First way: in model ; add multilinetext propert to field..
[DataType(DataType.MultilineText)]
public string Description { get; set; }
Second way: in view ; use TextAreaFor instead EditorFor (* not necessary addin multiline to model.)
@Html.TextAreaFor(model => model.Description, new { htmlAttributes = new { @class = "form-control" } })
** my choice is first way ..
Yorumlar
Yorum Gönder