I am trying to create a textarea element with a default using the ASP.NET MVC TextAreaFor method.
<%= Html.TextAreaFor(a => a.Description, new { Class = "gray", rows = "1", cols = "1", @onclick = "clearGray($(this));", Value = "Test sentence" })%>
There is a box, but I do not see the set value. It appears during validation, but not in the text box. I know that you should set it as <textarea>Test sentence</textarea>, but I don’t know how to do it with a helper method.
I tried using the Content attribute, but that didn't work. Any solutions?
Edgar source
share