You can specify the value of the Description property in the controller action when creating the model and pass this model to the view:
public ViewResult Create()
{
var model = new MyPageModel()
{
Description = "Description: ";
}
return View(model);
}
In view:
<%: Html.TextAreaFor(model.Description) %>
Setting the value will not work, because the contents of the TextArea are indicated between the opening and closing tags, and not as an attribute.
source
share