title: Posting to a list<modeltype> MVC3
body: <p>I am trying to get my view to post a List back to the action however it keeps coming in as null.</p>
  
  <p>So my Model has a List of WeightEntry objects.</p>
  
  <p>Exercise Model</p>
  
  <pre><code>public class Exercise
  {
      public List&lt;WeightEntry&gt; Entries { get; set; }
      public int ExerciseID { get; set; }
      public int ExerciseName { get; set; }
  }
  </code></pre>
  
  <p>WeightEntry Model</p>
  
  <pre><code>public class WeightEntry
  {
      public int ID { get; set; }
      public int Weight { get; set; }
      public int Repetition { get; set; }
  }
  </code></pre>
  
  <p>My View contains the ExerciseName and a forloop of WeightEntry objects</p>
  
  <pre><code>@model Mymvc.ViewModels.Exercise
  ...
  &lt;span&gt;@Model.ExerciseName&lt;/span&gt;
  @using (Html.BeginForm())
  {
      @Html.ValidationSummary(true)
      &lt;table class="left weight-record"&gt;
          &lt;tr&gt;
              &lt;th&gt;Reps&lt;/th&gt;
              &lt;th&gt;Weight&lt;/th&gt;
          &lt;/tr&gt;
          @foreach (var item in Model.Entries)
          {
              &lt;tr&gt;
                  &lt;td&gt;
                      @Html.EditorFor(x =&gt; item.Repetition)
                  &lt;/td&gt;
                  &lt;td&gt;
                      @Html.EditorFor(x =&gt; item.Weight)
                  &lt;/td&gt;
              &lt;/tr&gt;
          }
      &lt;/table&gt;
      &lt;input type="submit" value="Save" /&gt; 
  }
  </code></pre>
  
  <p>The Controller Action (Post) Does nothing at the moment. I am just trying to get the binding working before I add the save code.</p>
  
  <pre><code>[HttpPost]
  public ActionResult WeightEntry(Exercise exercise)
  {
      try
      {
          //Add code here to save and check isvalid    
          return View(exercise);
      }
      catch
      {
          return View(exercise);
      }
  }
  </code></pre>
  
  <p>I have seen a few little tricks with adding a numerator to the form elements' names used in MVC2 but I was wondering if MVC3 was any different? I was hoping it would all bind nicely with ID's being 0 or null but instead the whole List is null when I inspect it after the form posts. Any help is appreciated.
  Thanks.</p>