title: Bind ViewModel with List<T> to a specific control
body: <p>I have a ViewModel which contains a List.</p>
  
  <p>The examples I've seen show:  </p>
  
  <ol>
  <li><p>Accessing the List items by iterating over all of them:  </p>
  
  <pre><code>for (var i = 0; i &lt; Model.Compliances.Count; i++)  
  {
      &lt;%=Html.HiddenFor(x =&gt; x.Compliances[i].ComplianceId) %&gt;  
      &lt;%=Html.TextBoxFor(x =&gt; x.Compliances[i].ComplianceName) %&gt;       
  }
  </code></pre></li>
  <li><p>OR Specifying a hard coded position in the List:</p>
  
  <pre><code>&lt;%=Html.HiddenFor(x =&gt; x.Compliances[2].ComplianceId) %&gt;
  &lt;%=Html.TextBoxFor(x =&gt; x.Compliances[2].ComplianceName) %&gt;
  </code></pre></li>
  </ol>
  
  <p>I am wondering if there is some way to bind a particular List item to a control by something more concrete like its id, instead of what position it happens to have in the List?  </p>
  
  <p>Thanks for any help on this!</p>