Accessing data associated with executing the RepeaterItem on Command
I want to access the data associated with the RepeaterItem in which the ItemCommand fires. The scenario is that I have several RepeaterItems that control a Button in which the command is set declaratively like this:
<asp:Repeater ID="Repeater3" runat="server" DataSource='<%# ClientManager.GetClientEmployees(Eval("ClientID")) %>' OnItemCommand="RemoveEmployeeFromClient">
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" Text="(x)" CommandName="RemoveEmployeeFromClient"></asp:LinkButton>
</ItemTemplate>
<SeparatorTemplate>,<br /></SeparatorTemplate>
</asp:Repeater>
Code behind:
Protected Sub RemoveEmployeeFromClient(ByVal source As Object, ByVal e As RepeaterCommandEventArgs)
' I want to access the data associated with the RepeaterItem which the Button was clicked.
End Sub
0
a source to share