Search code examples
asp.netvb.netdatagridrepeaterlinkbutton

How can I pull ID from a form control in a datagrid / repeater (vb)


I have the following repeater

<asp:Repeater id="weatherFeed" Runat="server"><ItemTemplate>
    <asp:LinkButton runat="server" id="PickInfo" onClick="Selection_PickInfo">
     <img src="images/mapPin.png" title="<%#Container.DataItem("city")%>" />
    </asp:LinkButton>
</ItemTemplate></asp:Repeater>

I'd like to call my function "Selection_PickInfo" using the Link buttons created, but I'm having the issue of not being able to actually pull information from these links.


Solution

  • I figured it out. In your function just do Sender.ID