title: MVC Collection Missing items on Post
body: <p>I've recently run into some behaviour with MVC4 that I'm hoping to gain some perspective on.  The behaviour in my actual project uses more complex objects, but I was able to replicate it with simple objects, which is what I'm using in this question.  My situation is as follows:</p>
  
  <ol>
  <li>I have a View that uses a Collection of strings as its model.  </li>
  <li>I'm calling "EditorFor" to display each string in the collection.  </li>
  <li>In the controller, I am populating the model with 7 string items and passing it to the view.  </li>
  <li>The view renders all 7 items.</li>
  <li>I'm using jquery to remove the 2nd item in the collection from the DOM.</li>
  <li>I click submit to post back.</li>
  <li>I check the contents of my posted back model and it only contains the first item in the list.  I expected to have 6 items in the list (7 minute the one I removed from the DOM).</li>
  </ol>
  
  <p>The code for the described situation is as follows:</p>
  
  <p>View</p>
  
  <pre><code>@model ICollection&lt;string&gt;
  
  @{
      ViewBag.Title = "Home Page";
  }
  
  @using (Html.BeginForm("Index", "Home", FormMethod.Post))
  {
      @Html.EditorFor(x =&gt; x);
      &lt;input id="btnSubmit" type="submit" value="Submit" /&gt;
  }
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>[HttpGet]
  public ActionResult Index()
  {
       List&lt;string&gt; vm = new List&lt;string&gt;
       {
           "one",
           "two",
           "threE",
           "four",
           "five",
           "six",
           "seven"
       };
  
       return View(vm);
  }
  
  [HttpPost]
  public ActionResult Index(List&lt;string&gt; vm)
  {
      return View(vm);
  }
  </code></pre>
  
  <p>Thanks to anyone who helps out with this.  Looking forward to increasing my understanding of MVC!</p>