title: ModelBinding a List of Editable Integers
body: <p>I have a view that looks like this:</p>
  
  <pre><code>@model List&lt;int&gt;
  
  @{
      ViewBag.Title = "Index";
  }
  
  &lt;h2&gt;Index&lt;/h2&gt;
  
  @using (Html.BeginForm())
  {
  &lt;ul&gt;
  @{int counter = 0;}
  @foreach (var i in Model)
  {
      &lt;li&gt;@Html.TextBoxFor(m =&gt; m[counter])&lt;/li&gt;
      counter++;
  }
  &lt;/ul&gt;
  }
  </code></pre>
  
  <p>my problem is that the generated html looks like this...</p>
  
  <pre><code>    &lt;li&gt;&lt;input name="[0]" type="text" value="1" /&gt;&lt;/li&gt;
  etc.. etc...
  </code></pre>
  
  <p>When I post back to the controller, the form names don't bind to a my controller. Any thoughts on how to fix it (prefix or something perhaps?)</p>