title: Posting a view that contains multiple partial views
body: <p>I'm having a problem with posting a view that has multiple partial views within it 
  using one submit button</p>
  
  <p>This is my A model,</p>
  
  <p>:UPDATED:</p>
  
  <pre><code>public class AModel
  {
      public int AID { get; set; }
  
      public int BID { get; set; }
  
      public int CID { get; set; }
  
      public int ANumber { get; set; }
  
      public BModel BModel { get; set; }
  
      public CModel CModel { get; set; }
  }
  </code></pre>
  
  <p>this is my B model</p>
  
  <pre><code>public class BModel
  {       
      public int BID { get; set; }
      public int BName { get; set; }
  
      public IList&lt;DModel&gt; DModel { get; set; }
  }    
  </code></pre>
  
  <p>this is the D model</p>
  
  <pre><code>public class DModel
  {
      public int DID { get; set; }
  
      public int? Number { get; set; }
  }
  </code></pre>
  
  <p>this is the c Model</p>
  
  <pre><code>public class CModel
  {
      public int CID { get; private set; }
  
      public IList&lt;HModel&gt; HModels { get; set; }
  }
  </code></pre>
  
  <p>and so on 
  this is the main view </p>
  
  <pre><code>@model Project.Web.Models.AModel    
  @using (Html.BeginForm())
  {
      @Html.AntiForgeryToken()
      @Html.Partial("CreateB",Model.BModel);
      @Html.Partial("CreateC",Model.CModel);
      &lt;input style="border-radius:4px;width:100px;" type="button" value="next" id="next" class="btn btn-default" /&gt;
  }
  </code></pre>
  
  <p>this is the Get action</p>
  
  <pre><code>public ActionResult Create(){
  Models.AModel model = new Models.AModel(){
  BModel = new BModel(){
  DModel = new List&lt;Models.DModel&gt;(){ new Models.DModel() },
  
  CModel = new CModel(){
  HModel = new List&lt;HModel&gt;(){ new Models.HModel() },
  };
  return View(model);
  }
  </code></pre>
  
  <p>this is the Post action</p>
  
  <pre><code>[HttpPost]
  public ActionResult Create(Models.AModel model)
  {
     //doing things with data 
     //when I reach this point all object are null  
     return RedirectToAction("index", model);
  }
  
  public void SetNumber(Models.BModel model){
  model.DModel.Add(new Models.DModel());
  }
  </code></pre>
  
  <p>Partial View For BModel, and CModel is similar to BModel Partial view
  Note: the SetNumber method only create a new Object and add it to the list</p>
  
  <pre><code>@model Project.Web.Models.BModel
  
  @Html.TextBoxItemFor(x =&gt; x.BName)
  
  @for ( int i=0; i&lt; Model.DModel.Count; i++){
  @Html.TextBoxItemFor( x =&gt; x.DModel[i].Number)
   &lt;a id="addNumber" href="/AController/SetNumber/" data-ajax="true" data-
   ajax-method="GET" &gt;Add Another Number&lt;/a&gt;
  }
  </code></pre>
  
  <p>What can I do? What Am I missing?</p>