title: Dynamically add items to a collection in MVC2 using EditorFor()
body: <p>I'm trying to do this: <a href="http://blog.stevensanderson.com/2010/01/28/editing-a-variable-length-list-aspnet-mvc-2-style/" rel="nofollow noreferrer">Editing a variable length list, ASP.NET MVC 2-style</a></p>
  
  <p>In the post he mentions that it could be done with less code using Html.EditorFor(), but that it would be more difficult because of the indexes. Well, that's exactly what I want to do, and I don't know where to begin. </p>
  
  <p>I'm an ASP.NET novice who just completed the Nerd Dinner tutorial before jumping into a project at work, so any help would be appreciated.</p>
  
  <p><strong>Update 1:</strong> Instead of generating a GUID for each item in the collection, I'd like to generate incremental indexes starting with 0. Right now the field names look like "gifts[GUID].value"; I would like them to be "gifts[0].value","gifts<a href="http://blog.stevensanderson.com/2010/01/28/editing-a-variable-length-list-aspnet-mvc-2-style/" rel="nofollow noreferrer">1</a>.value" etc. but I don't understand how the collection keeps track and generates these indices.</p>