I have a asp.net mvc view that allows the user to enter some description in a textarea.
There are two problems that I am facing.
Either when I expand the textarea it is expanding without moving other html elements or I am not able to make create a Html.TextBoxFor () multiline textbox. Can anyone suggest a solution to this? If Use Textarea how to make it expand(grow in size) so that it does not overlap with other elements or how to use Html.TextBoxFor() for multiline?
This is how my code looks like
<% using (Html.BeginForm())
{ %>
<%: Html.ValidationSummary(true)%>
<fieldset>
<div class="editor-label1">
<%: Html.LabelFor(Model => Model.PackageID)%>
</div>
<div class ="editor-field1">
<%: Html.HiddenFor(Model => Model.PackageID)%>
<%: Html.DisplayFor(Model => Model.PackageID)%>
<%: Html.ValidationMessageFor(Model => Model.PackageID)%>
</div>
<div class="editor-label1">
<%: Html.LabelFor(Model => Model.PackageName)%>
</div>
<div class ="editor-field1">
<%: Html.TextBoxFor(Model => Model.PackageName)%>
<%: Html.ValidationMessageFor(Model => Model.PackageName)%>
</div>
<div class="editor-label1">
<%: Html.LabelFor(Model => Model.PackageDesc)%>
</div>
<div class ="editor-field1" style= "padding-bottom: 50px; margin-bottom: 150px">
<%: Html.TextBoxFor(Model => Model.PackageDesc, new { TextMode = TextBoxMode.MultiLine, cols = "55", rows = "10" })%>
<%: Html.ValidationMessageFor(Model => Model.PackageDesc)%>
</div>
<div class="editor-label1">
<%: Html.LabelFor(Model => Model.PackageTitle)%>
</div>
<div class ="editor-field1">
<%: Html.TextBoxFor(Model => Model.PackageTitle)%>
<%: Html.ValidationMessageFor(Model => Model.PackageTitle)%>
</div>
<div class ="editor-label">
<%: Html.Label("Project ID") %>
</div>
<div class="editor-field">
<%:Html.DropDownList("ProjectID", (IEnumerable<SelectListItem>)ViewData["projects"])%>
</div>
<div>
<input type="submit" value="Save Edit" />
</div>
</fieldset>
<% } %>