title: asp net MVC3 submit List of object is null when post back
body: <p>I use asp net MVC 3 one of my project.I use partial view for my coding. I want to list all customers in a list and submit their information as a list. When I try to submit my list in post back, it sends my list is null. You can find my code as in the below:</p>
  
  <p>My controller method is:</p>
  
  <pre><code>[HttpPost]
      public ActionResult ConfirmUsers(ICollection&lt;Career.DomainModel.UserApprovalDto&gt; collection)
      {
          string bas = "";
          //if (collection != null)
  
          if (ModelState.IsValid)
          {
              bas = "bas";
          }
  
          return RedirectToAction("Index");
      }
  </code></pre>
  
  <p>My partial view is:</p>
  
  <pre><code>@model List&lt;Career.DomainModel.UserApprovalDto&gt;
  @using (Html.BeginForm("ConfirmUsers", "ManageUsers", new { area = "" }, FormMethod.Post))
  {
      &lt;table&gt;
          &lt;tr&gt;
              &lt;th&gt;
                  Name
              &lt;/th&gt;
              &lt;th&gt;
                  Is Reported
              &lt;/th&gt;
          &lt;/tr&gt;
          @for (int i = 0; i &lt; Model.Count(); i++)
          {
              &lt;tr&gt;
                  &lt;td&gt;
                      @Html.DisplayFor(modelItem =&gt; Model[i].FirstName)
                  &lt;/td&gt;
                  &lt;td&gt;
                      @Html.CheckBox("IsReported", Model[i].IsReported.HasValue ? Model[i].IsReported.Value : false)
                      @*@Html.CheckBoxFor(modelItem =&gt; Model[i].IsReported.Value);*@ @*    @if (Model[i].IsReported != null)
                      {
                          @Html.CheckBoxFor(modelItem =&gt; Model[i].IsReported.Value);
                      }
                      else
                      {
                          @Html.CheckBoxFor(modelItem =&gt; Model[i].IsReported.Value);
                      }*@
                  &lt;/td&gt;
                  &lt;td&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          }
      &lt;/table&gt;
      &lt;div&gt;
          &lt;input name="submitUsers" type="submit" value="Save" /&gt;
      &lt;/div&gt;
  }
  </code></pre>
  
  <p>Thanks in advance.</p>
  
  <p>Kerem</p>