Author: nereo.lopez | Posted on: 5/26/2010 11:11:22 AM | Views : 349

Hi all!
I have a accordion control inside an update panel. As I loop through the Products table and the Details table in the code behind, I'm creating the accordion panes that will display the data. There's an "Add to Cart" button created for each product (each accordion pane), and I'm asigning an EventHandler for that button, but it never fires... Could anyone help me?
Here's the code where I'm creating and adding the button to the page:

Dim cmdAdd As New ImageButton cmdAdd.ID = "cmdAdd" & Trim(dtArt.Rows(j).Item("articulo").ToString) cmdAdd.ImageUrl = "/imagenes/AddToCart32.png" cmdAdd.CommandArgument = cmdAdd.ID cmdAdd.ToolTip = "Añadir al carrito" 'añado el controlador de evento para saber cuando hizo click ese botón en concreto AddHandler cmdAdd.Command, AddressOf addToCart
tc1.Controls.Add(lblTit ...

Go to the complete details ...