I created an ImageButton in code behind. Now I need that when a client press the ImageButton, the ImageButton will do a certain function. The problem is that it doesn't do this certain function.
this is the code-
var img = new ImageButton();
img.ID = "Del" + i.ToString();
img.ImageUrl = "images/1395958363_meanicons_57.png";
img.Width = 48;
img.Height = 38;
img.Click += new System.Web.UI.ImageClickEventHandler(this.btnForDelete_Click); //doesn't work!!
Lab.Controls.Add(img); //put the image in a label