title: Post from MVC view don't get bind to controller model
body: <p>I have a partial view which is displayed on modal window:</p>
  
  <pre><code>public ActionResult Details(string test)
  {
      var model = _taskService.GetDocumentTasks(test);
  
      return PartialView("_Details", new CustomViewModel { TaskList = model.ToList() });
  }
  
  public class CustomViewModel
  {
      public DocumentStatus Status { get; set; }
      public IList&lt;DocumentTask&gt; TaskList { get; set; }
  }
  </code></pre>
  
  <p>I am able to loop TaskList in the view and draw form fields like this:</p>
  
  <pre><code>@model CustomViewModel
  
  @using (Html.BeginForm())
  {
      @for (int i = 0; i &lt; Model.TaskList.Count(); i++)
      {
          @Html.HiddenFor(m =&gt; m.TaskList[i].TaskId)
  
          &lt;div class="col-sm-6 col-md-4"&gt;
              &lt;img src="@Html.EditorFor(m =&gt; m.TaskList[i].DocumentPath)"&gt;                                
              .. other form items here
          &lt;/div&gt;                    
      } 
  
  &lt;input class="btn btn-primary" type="submit" value="Save" /&gt;
  }
  </code></pre>
  
  <p>This displays the form fields but when I click the submit button the modal which is sent to the controller is null. I have tried a few different ways of binding it but no success. The model on on the below controller is always null. Any idea how to bind the submitted form details to controller model?</p>
  
  <pre><code>    [HttpPost]
      [ValidateAntiForgeryToken]
      public ActionResult Details(CustomViewModel model) 
      {
      }
  </code></pre>
  
  <p>Thanks.</p>