title: IEnumerable data not passing back from view to controller
body: <p>In my MVC4 Project view am passing <code>IEnumerable&lt;Settings&gt;</code> model to view. When i submit the form back to my controller, the controller method is having parameter as <code>IEnumerable&lt;Settings&gt; data</code>. The problem is that <code>data</code> is always null.</p>
  
  <p><strong>View</strong></p>
  
  <pre><code>@model IEnumerable&lt;Settings&gt;
  
  @using (Html.BeginForm("Index", "Layout", FormMethod.Post)))
  {
      @foreach (var item in Model)
      {
         @Html.CheckBoxFor(modelItem =&gt; item.IsActive, new { @value = item.Id })
         @Html.DisplayFor(modelItem =&gt; item.Name)
      }
      &lt;input type="submit" value="Save" /&gt;
  }
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>[HttpPost]
  public ActionResult Index(IEnumerable&lt;Settings&gt; data)
  {
      --actual code goes here
  }
  </code></pre>
  
  <p><strong>Model</strong></p>
  
  <pre><code>[Serializable]
  public class Settings
  {   
      public virtual byte Id { get; set; }
  
      public virtual string Name { get; set; }
  
      public virtual bool IsActive { get; set; }
  
      public virtual DataTable DataResult { get; set; }
  
      public virtual int CreatedBy { get; set; }
  
      public virtual DateTime CreatedDate { get; set; }
  
      public virtual int ClientId { get; set; }
  
      public virtual Int16 NoofItems { get; set; }
  }
  </code></pre>
  
  <p><strong>Update:</strong>
  *<em>Rendered HTML</em>*</p>
  
  <pre><code>&lt;td&gt;
      &lt;input checked="checked" data-val="true" data-val-required="The IsActive field is required." id="item_IsActive" name="item.IsActive" type="checkbox" value="13" class="valid"&gt;&lt;input name="item.IsActive" type="hidden" value="false"&gt;
                                  # of pieces
  
                                  &lt;/td&gt;
  </code></pre>
  
  <p><strong>Update1:</strong>
  Rendered HTML after following answer by Andrei</p>
  
  <pre><code>&lt;td&gt;
       &lt;input checked="checked" data-val="true" data-val-required="The IsActive field is required." name="[0].IsActive" type="checkbox" value="13"&gt;&lt;input name="[0].IsActive" type="hidden" value="false"&gt;
                                      # of pieces&lt;/td&gt;
  </code></pre>