I\'m working on an MVC project using C#. Right now, I\'m trying to customize my views a little, and I\'d like to make the text boxes bigger.
I followed the suggesti
To adhere to a previously created view style, you can also do this:
<div class="col-md-10 editor-multiline-field">
If you are using mvc and bootstrap try this:
@Html.TextAreaFor(model => model.Property, new { @class = "form-control", @rows = 5 })
try
@Html.TextAreaFor(model => model.Descricao, 5, 50, null)
in View Page
In MVC 5 you can use
@Html.TextAreaFor(model => model.body, 5, 50, new { @class = "form-control" } )
Works nicely!
You can also use @Html.TextArea ou TextAreaFor
@Html.TextAreaFor(model => model.Text, new { cols = 25, @rows = 5 })
I would do this with CSS:
<div class="editor-multiline-field">
@Html.EditorFor(model => model.Body)
@Html.ValidationMessageFor(model => model.Body)
</div>
and then in your CSS file define the width and height to the desired values:
.editor-multiline-field textarea {
width: 300px;
height: 200px;
}