title: MVC3 Partial View and Model not posting back changes
body: <p>I have a Model than contains a collection of items that can be modified.</p>
  
  <p>I render the collection using a Partial View, which in turn uses EditorForModel to output the HTML for each element in the collection.</p>
  
  <pre><code>@model Footy.Models.EventModel
  
      &lt;h2&gt;@Model.Team1Name vs @Model.Team2Name&lt;/h2&gt;
      @using (Html.BeginForm("Index", "Event"))
      {
          @Html.HiddenFor(m =&gt; m.EventID)
          &lt;h1&gt;
              Team 1 Squad&lt;/h1&gt;
          @Html.Partial("EventPlayers", Model.Team1Players);
          &lt;h1&gt;
              Team 2 Squad&lt;/h1&gt;
     Html.RenderPartial("EventPlayers", Model.Team2Players);
  
          &lt;input type="submit" value="Confirm Changes" /&gt;
      }
  </code></pre>
  
  <p>Partial View</p>
  
  <pre><code>@model IEnumerable&lt;Footy.Models.PlayerModel&gt;
  @Html.EditorForModel()
  </code></pre>
  
  <p>PlayerModel View</p>
  
  <pre><code>@model Footy.Models.PlayerModel
  
  @Model.PlayerName @Html.DropDownListFor(p =&gt; p.ParticipationStatusID, new SelectList(Model.ParticipationTypes, "Key", "Value"))
  </code></pre>
  
  <p>It all renders correctly, but when the user clicks the input, the controller method is not passed the child collection in the model, e.g. Model.Team1Players is null</p>
  
  <p>What am I missing?</p>
  
  <p>EDIT: Generated HTML is</p>
  
  <pre><code>    &lt;form action="/Footy/Event/Index/1" method="post"&gt;&lt;input data-val="true" data-val-number="The field EventID must be a number." data-val-required="The EventID field is required." id="EventID" name="EventID" type="hidden" value="1" /&gt;            
  &lt;h1&gt;Team 1 Squad&lt;/h1&gt;
        si &lt;select data-val="true" data-val-number="The field ParticipationStatusID must be a number." data-val-required="The ParticipationStatusID field is required." name="[0].ParticipationStatusID"&gt;&lt;option value="1"&gt;Team&lt;/option&gt;
      &lt;option value="2"&gt;Sub&lt;/option&gt;
      &lt;option value="3"&gt;Squad&lt;/option&gt;
      &lt;/select&gt;
      &lt;h1&gt;Team 2 Squad&lt;/h1&gt;
   &lt;input type="submit" value="Confirm Changes" /&gt;
   &lt;/form&gt;
  </code></pre>
  
  <p>Thanks</p>
  
  <p>I think it is related to this question, which doesn't yet have an answer: <a href="https://stackoverflow.com/questions/7457967/posting-data-back-to-a-controller-from-a-partial-view-rendered-by-ajax">Posting data back to a controller from a Partial View rendered by Ajax</a></p>