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?Product ID=<%#Cont ainer.Data Item("Prod uctID")%>" ><%#Contai ner.DataIt em("Title" )%></a>
</div>
<div style="height:150px;width: 150px;">
<a href="Product.aspx?Product ID=<%#Cont ainer.Data Item("Prod uctID")%>" >
<img alt="" height="150px" width="150px" src="images/<%#Container.D ataItem("I mageURL")% >" border="0" /></a>
</div>
<div style="position:relative;t op:-130px; left:160px ">
<%#Container.DataItem("Des cription") %>
</div>
<asp:Button ID="Button1" runat="server" Text="Remove From Favourites" />
<asp:Button ID="Button2" runat="server" Text="Purchase Item" />
</div>
</ItemTemplate></asp:Repea ter>
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?Product
</div>
<div style="height:150px;width:
<a href="Product.aspx?Product
<img alt="" height="150px" width="150px" src="images/<%#Container.D
</div>
<div style="position:relative;t
<%#Container.DataItem("Des
</div>
<asp:Button ID="Button1" runat="server" Text="Remove From Favourites" />
<asp:Button ID="Button2" runat="server" Text="Purchase Item" />
</div>
</ItemTemplate></asp:Repea
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.