title: How to get element Id inside repeater control in ASpx page using C#
body: <p>I have done some searching on this but i can't seem to find anything related to my issue but how do i get the element Id inside a repeater control? for example i have the following: </p>
  
  <pre><code>&lt;asp:Repeater ID="Rpt" runat="server"&gt;
      &lt;ItemTemplate&gt;
          &lt;p&gt;&lt;%# Eval("Name") %&gt;
          &lt;asp:HyperLink  ID="Url" runat="server" Text ="&lt;%# Eval("Url") %&gt;"/&gt;  &lt;/span&gt;&lt;/p&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>Behind the code i want to get and set Id (url) of the hyper link in code above but for some reason i can't access behind the code as it is not recognised. what is the best way to get the Id?</p>
  
  <p>in my c# code , i just want to set url like so:
  Url.NavigateUrl = '<a href="https://stackoverflow.com">https://stackoverflow.com</a>';</p>
  
  <p>edit</p>
  
  <p>now it doesn't hit the code inside the foreach loop.</p>
  
  <pre><code>foreach (RepeaterItem item in Rpt.Items)
  {
     HyperLink Url = item.FindControl("Url") as HyperLink;
     Url.NavigateUrl = link from db;
  }
  </code></pre>
  
  <p>Many thanks</p>