Hi,
I have a repeater control with a button control in the item template which isnt firing when clicked.
My .aspx code is as follows:
<asp:Repeater ID="rptProducts" runat="server" OnItemCommand="rptProducts
_ItemComma
nd">
<ItemTemplate>
<%#Eval("name")%><br />
<%#Eval("image")%><br />
<%#Eval("Price")%><br />
<asp:Button ID="btnAddBskt" runat="server" CommandName="Add" CommandArgument='<%#Eval("
PID") %>' Text="add to basket" />
<hr />
</ItemTemplate>
</asp:Repeater>
my vb.net code is as follows:
Protected Sub rptProducts_ItemCommand(By
Val source As Object, ByVal e As System.Web.UI.WebControls.
RepeaterCo
mmandEvent
Args) Handles rptProducts.ItemCommand
Dim PID As Integer
PID = e.CommandArgument
End Sub
Can anyone shed any light as to why it wont fire?
Start Free Trial