KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I know you can use the DataType attribute with the EditorFor html helper to specify that a particular property of a model entity should be displayed as a multi-line input field. What If I want to specify the number of rows and columns the text area must have? In the model : [DataType(DataType.MultilineText)] public string HTMLText { get; set; } In the view : @Html.EditorFor(x => x.HTMLText) Wanted result : <textarea id="HTMLText" rows="10" cols="40">value</textarea> Is there a way to generate this kind of code without using the @Html.Textarea() helper?
Tags (comma-separated)
Save Edits
Cancel