Link to home
Start Free TrialLog in
Avatar of VegMan99
VegMan99

asked on

Button click within repeater VB

Hi I have the following repeater, its displaying a list of products that have been displayed due to certain criteria specified.
I have added 2 button, but i don't know how i can access the button click on event on them, as they are within the repeater...
when i click one of the buttons, i need to capture the productID for the item within the repeater it is clicked for... below is the code for the repeater....
could any one help me, using VB code?

<asp:Repeater ID="repFavourites" runat="server">
<ItemTemplate>
<div style="border: 1px black solid;margin-bottom:5px;">
<div>
<a href="Product.aspx?ProductID=<%#Container.DataItem("ProductID")%>"><%#Container.DataItem("Title")%></a>
</div>
<div style="height:150px;width:150px;">
<a href="Product.aspx?ProductID=<%#Container.DataItem("ProductID")%>">
<img alt="" height="150px" width="150px" src="images/<%#Container.DataItem("ImageURL")%>" border="0" /></a>
</div>
<div style="position:relative;top:-130px;left:160px">
<%#Container.DataItem("Description")%>
</div>
<asp:Button ID="Button1" runat="server" Text="Remove From Favourites" />
<asp:Button ID="Button2" runat="server" Text="Purchase Item" />
</div>
</ItemTemplate></asp:Repeater>
ASKER CERTIFIED SOLUTION
Avatar of MikeMCSD
MikeMCSD
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial