I have a problem.
I need to create a dynamic image button and assign the event "click" on a node of a "treeview", the problem is that when you click the image button disappears and never calls the event "lkbEliminar_Click".
ImageButton lkbEliminar = new ImageButton();
lkbEliminar.ImageUrl = "~/images/delete.png";
lkbEliminar.ToolTip = "Eliminar Documento";
lkbEliminar.Click += new System.Web.UI.ImageClickEventHandler(lkbEliminar_Click);
I need to create a dynamic image button and assign the event "click" on a node of a "treeview", the problem is that when you click the image button disappears and never calls the event "lkbEliminar_Click".
lkbEliminar.ImageUrl = "~/images/delete.png";
lkbEliminar.ToolTip = "Eliminar Documento";
lkbEliminar.Click += new System.Web.UI.ImageClickEventHandler(lkbEliminar_Click);
nodoHijoMenor.Controls.Add(lkbEliminar);
nodoHijoMayor.Nodes.Add(nodoHijoMenor);
nodoHijoMayor.Nodes.Add(nodoHijoMenor);
protected
void
lkbEliminar_Click(
object
sender, ImageClickEventArgs e)
{
string
x =
"asdas"
;
x = x +
"asdsa"
;
}