forum

Home / DeveloperSection / Forums / How to access dynamically created items in a repeater?

How to access dynamically created items in a repeater?

Manoj Bhatt 1956 03-Sep-2014

I have a repeater:

<asp:repeater id="someID" runat="server">

   <ItemTemplate>

      <asp:hyperlink id=<%# Eval("ID")%> runat="server"></asp:hyperlink>

   </ItemTemplate>

</asp:repeater>

I need to get reference to each hyperlink and access to the attributes of it.

On ItemDataBound, how do I go ahead and access a hyperlink whose ID is just being set? If I had a fixed ID for the hyperlink, that wouldn't be a problem. But since the I need the ID to also be assigned dynamically, I kinda got lost in finding the way.


Updated on 03-Sep-2014

Can you answer this question?


Answer

1 Answers

Liked By