Question : button event not firing in repeater control

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:


   
        <%#Eval("name")%>

        <%#Eval("image")%>

        <%#Eval("Price")%>

       
       

   



my vb.net code is as follows:

    Protected Sub rptProducts_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles rptProducts.ItemCommand
        Dim PID As Integer
        PID = e.CommandArgument
    End Sub


Can anyone shed any light as to why it wont fire?

Answer : button event not firing in repeater control

How and when are you binding data to the repeater? If you are doing it every page load it may effect the button firing event.

Also note you don't need to have onItemCommand="..." if you have marked the funciton as handling the event with Handles... if you put both the function will fire twice.
Random Solutions  
 
programming4us programming4us