How to dynamically assign asp.net control ID's
<p>I want to do something like the following in an asp.net web form but get a Invalid Token error message:</p>

<pre><code>&lt;ul&gt;
    &lt;%foreach (var item in Items) {%&gt;
    &lt;li&gt;
      &lt;asp:TextBox ID="&lt;%= item.Id  %&gt;" runat="server" /&gt;
    &lt;/li&gt;
    &lt;%} %&gt;
&lt;/ul&gt;
</code></pre>

<p>What alternative methods are there to achieve the desired result?</p>
