Monday, April 1, 2013

How to use TextArea for @Html.EditorFor in ASP.NET MVC?

Two ways:
1. Add data annotation in Model class
[DataType(DataType.MultilineText)]
public string Text { get; set; }

2. @Html.TextAreaFor(model => model.Text)

No comments:

Post a Comment