title: ASP.NET Change Dropdown Control ID Inside Repeater Item Dynamically
body: <p>Can someone tell me how I can get this to work. I want to distinguish dropdown controls inside a repeater control. I understand now about the lifecyle and how the buffer is already writen, but what are my alternatives? Here is what happens</p>
  
  <p>Code File</p>
  
  <pre><code>    Dim repeatTimes((TotalAdInsured - 1)) As Integer
  
      myRepeater.DataSource = repeatTimes
      myRepeater.DataBind()
  </code></pre>
  
  <p>Aspfile</p>
  
  <pre><code>&lt;asp:Repeater ID="myRepeater" runat="server"&gt;
      &lt;ItemTemplate&gt;
           &lt;asp:DropDownList ID="AdTitle&lt;%# Container.ItemIndex %&gt;" runat="server"&gt;
               &lt;asp:ListItem Selected="True" Value="" Text=""/&gt;
               &lt;asp:ListItem Selected="False" Value="Miss" Text="Miss"/&gt;
               &lt;asp:ListItem Selected="False" Value="Ms" Text="Ms"/&gt;
               &lt;asp:ListItem Selected="False" Value="Mrs" Text="Mrs"/&gt;
               &lt;asp:ListItem Selected="False" Value="Mr" Text="Mr"/&gt;
               &lt;asp:ListItem Selected="False" Value="Other" Text="Other"/&gt;
           &lt;/asp:DropDownList&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>Returns this error</p>
  
  <blockquote>
    <p>Parser Error Message: 'AdTitle&lt;%# Container.ItemIndex %>' is not a valid identifier.</p>
  </blockquote>