Help creating textboxes via loop in aspx file
<p>I am having issues with giving id to a text box in the aspx for</p>

<p>heres my code</p>

<pre><code>  &lt;%for (int i = 2; i &lt;= 10; i++)%&gt;
    &lt;%  {%&gt;
          &lt;div id="divPerson&lt;%= i %&gt;"&gt;

        &lt;label for="txtFirstNameFriend&lt;%= i %&gt;"&gt;Friends First Name&lt;/label&gt;
        &lt;asp:TextBox ID="txtFirstNameFriend&lt;%= i %&gt;" MaxLength="50" runat="server"&gt;&lt;/asp:TextBox&gt;
        &lt;br /&gt;
        &lt;span id="ValFirstNameFriend&lt;%= i %&gt;" class="ValidationError" style="color:Red" visible="false" runat="server"&gt;&lt;p&gt;Please enter your First Name&lt;/p&gt;&lt;/span&gt;
        &lt;label for="txtLastNameFriend&lt;%=i %&gt;"&gt;Friends Last Name&lt;/label&gt;
        &lt;br /&gt;
        &lt;label for="txtEmailAddressFriend&lt;%= i %&gt;"&gt;Friends Email Address&lt;/label&gt;
        &lt;asp:TextBox ID="txtEmailAddressFriend&lt;%= i %&gt;"  MaxLength="255" runat="server"&gt;&lt;/asp:TextBox&gt;
        &lt;div style="display:none"&gt;&lt;asp:TextBox ID="ValFriend&lt;%=i %&gt;" CssClass="ValFriend&lt;%= i %&gt;" MaxLength="255" runat="server"&gt;&lt;/asp:TextBox&gt;&lt;/div&gt;

    &lt;br /&gt;

          &lt;/div&gt;

     &lt;% } %&gt;
</code></pre>

<p>Is there any way of adding in a dynamic id to a textbox created on the aspx file?</p>
