title: ASP.NET MVC FormCollection TextArea
body: <p>I have a textarea that represents a description field. The descriptions have commas so when trying to split the field's descriptions the data is not parsed correctly. How can I get each row's description correctly.</p>
  
  <pre><code>     var DescList = FormValues["Item.Description"].Split(',').Select(item =&gt; item).ToList&lt;string&gt;();
  //will not work for obvious reasons. Comma delimited FormCollection has commas to identify separate row data.
  </code></pre>
  
  <p>It seems like Microsoft designed the FormsCollection without the textarea control in mind. A text area with commas will not work when trying to access each value. What is interesting is that the _entriestables property has it in the perfect format but they chose to make it a private property. Very frustrating.</p>
  
  <p>`</p>
  
  <pre><code>Here is the important part of my viewmodel.
   public class TenantViewModel
  {
      public Tenant Tenant { get; set; }
                  public Site Site { get; set; }
  
      }
  </code></pre>
  
  <p>My view is populated like this:</p>
  
  <pre><code>    if (Model != null &amp;&amp; Model.Tenant != null &amp;&amp; Model.Tenant.Site != null &amp;&amp; Model.Tenant.Site.Count() &gt; 0)
      {&lt;div class="detailsbox_view"&gt;
          &lt;table id="tblTenantSites"&gt;
              &lt;tr&gt;
                  &lt;th&gt;@Html.LabelFor(item =&gt; item.Site.Title)&lt;/th&gt;
                  &lt;th&gt;@Html.LabelFor(item =&gt; item.Site.Description)&lt;/th&gt;
  
              &lt;/tr&gt;
          @foreach (var Item in Model.Tenant.Sites)
             {
              &lt;tr&gt;
                  @Html.HiddenFor(modelItem =&gt; Item.SiteId)
  
  
                  &lt;td&gt;
                      @Html.EditorFor(modelItem =&gt; Item.Title)
                                          &lt;/td&gt;
                  &lt;td&gt;
                      @Html.TextAreaFor(modelItem =&gt; Item.Description, new {@width="400" })
  
                  &lt;/td&gt;
  
              &lt;/tr&gt;   }
          &lt;/table&gt;
  </code></pre>
  
  <p>As you see this site table is a child of Tenant object. This child record does not get automatically updated using this method but the Tenant data does automatically get updated. This is the reason I tried the FormColelction instead.
  Is there something I am missing to make this work?</p>