title: Submitting form with view model with child collections
body: <p>I am wondering if the following is possible in MVC 3</p>
  
  <p>I basically have a ViewModel with a child collection that I want to post using an Ajax form:</p>
  
  <p>Model</p>
  
  <pre><code>    [Serializable]
      public class Customer
      {
          public string FirstName { get; set; }
          public string LastName { get; set; }
  
          public int CurrentSalesRep { get; set; }
  
          public List&lt;SelectListItem&gt; SalesReps { get; set; }
      }
  
      [Serializable]
      public class CustomerVM
      {
          public List&lt;Customer&gt; Customers { get; set; }
      }
  </code></pre>
  
  <p>SalesController</p>
  
  <pre><code>        [HttpPost]
          public ActionResult Customers(CustomerVM customer)
          {
              return PartialView(customer);
          }
  </code></pre>
  
  <p>View</p>
  
  <pre><code>@model  DropdownSave.Models.CustomerVM
  
  &lt;div&gt;
      @{
          using(Ajax.BeginForm("Customers", "Sales", new AjaxOptions { UpdateTargetId = "gridArea",HttpMethod="Post" })){
          &lt;div id="gridArea"&gt;
              &lt;table&gt;
              @foreach (var m in Model.Customers)
              {
                  &lt;tr&gt;
                      &lt;td&gt;
                          @Html.TextBoxFor(a =&gt; m.FirstName)
                      &lt;/td&gt;
                      &lt;td&gt;
                          @Html.TextBoxFor(a =&gt; m.LastName)
                      &lt;/td&gt;
                  &lt;/tr&gt;
              }
              &lt;/table&gt;                   
              &lt;input type="submit" value="Save" /&gt; 
  
          &lt;/div&gt;
          }
       }
  &lt;/div&gt;
  </code></pre>
  
  <p>Basically I am able to post an instance of CustomerVm to the controller, but the child collection is null. Is what I'm trying even possible?</p>