title: Html.TextAreaFor in asp.net mvc
body: <p>I have a asp.net mvc view that allows the user to enter some description in a textarea. </p>
  
  <p>There are two problems that I am facing.</p>
  
  <p>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?</p>
  
  <p>This is how my code looks like </p>
  
  <pre><code>&lt;% using (Html.BeginForm())
          { %&gt;
       &lt;%: Html.ValidationSummary(true)%&gt;
  
      &lt;fieldset&gt;
  
          &lt;div class="editor-label1"&gt;
              &lt;%: Html.LabelFor(Model =&gt; Model.PackageID)%&gt;
          &lt;/div&gt;
          &lt;div class ="editor-field1"&gt;
               &lt;%: Html.HiddenFor(Model =&gt; Model.PackageID)%&gt;
                &lt;%: Html.DisplayFor(Model =&gt; Model.PackageID)%&gt;
               &lt;%: Html.ValidationMessageFor(Model =&gt; Model.PackageID)%&gt;
          &lt;/div&gt;
  
           &lt;div class="editor-label1"&gt;
              &lt;%: Html.LabelFor(Model =&gt; Model.PackageName)%&gt;
          &lt;/div&gt;
          &lt;div class ="editor-field1"&gt;
              &lt;%: Html.TextBoxFor(Model =&gt; Model.PackageName)%&gt;
              &lt;%: Html.ValidationMessageFor(Model =&gt; Model.PackageName)%&gt;
          &lt;/div&gt;
  
          &lt;div class="editor-label1"&gt;
              &lt;%: Html.LabelFor(Model =&gt; Model.PackageDesc)%&gt;
          &lt;/div&gt;
          &lt;div class ="editor-field1" style= "padding-bottom: 50px; margin-bottom: 150px"&gt;
              &lt;%: Html.TextBoxFor(Model =&gt; Model.PackageDesc, new { TextMode = TextBoxMode.MultiLine, cols = "55", rows = "10" })%&gt;
  
              &lt;%: Html.ValidationMessageFor(Model =&gt; Model.PackageDesc)%&gt;
          &lt;/div&gt;
  
           &lt;div class="editor-label1"&gt;
              &lt;%: Html.LabelFor(Model =&gt; Model.PackageTitle)%&gt;
          &lt;/div&gt;
          &lt;div class ="editor-field1"&gt;
              &lt;%: Html.TextBoxFor(Model =&gt; Model.PackageTitle)%&gt;
              &lt;%: Html.ValidationMessageFor(Model =&gt; Model.PackageTitle)%&gt;
          &lt;/div&gt;
          &lt;div class ="editor-label"&gt;
              &lt;%: Html.Label("Project ID") %&gt;
          &lt;/div&gt;
          &lt;div class="editor-field"&gt;
              &lt;%:Html.DropDownList("ProjectID", (IEnumerable&lt;SelectListItem&gt;)ViewData["projects"])%&gt;
          &lt;/div&gt;
           &lt;div&gt;
                  &lt;input type="submit" value="Save Edit" /&gt;
           &lt;/div&gt;
      &lt;/fieldset&gt;
      &lt;% } %&gt;
  </code></pre>