title: Dynamically created image button click event is not fired
body: <p>On dynamically created table based on some condition i've added imagebutton dynamically. parallelly i want to add event for this image button click but the click event is not getting fired. here is my code snippet.</p>
  
  <pre><code>    private void createTable()
      {
          TableRow tableRow = new TableRow();
          TableCell ImageCell = new TableCell();
          ImageButton imgBtndeleteAttr = new ImageButton();
          imgBtndeleteAttr.ID = "imgbtn_" + i.ToString() + j.ToString();
          imgBtndeleteAttr.CssClass = "deleteDynamic";
          imgBtndeleteAttr.OnClientClick = "javascript:return confirm('Do you want to delete this Attribute?');";
          imgBtndeleteAttr.Click += new System.Web.UI.ImageClickEventHandler(imgBtndeleteAttr_Click);
          ImageCell.Controls.Add(imgBtndeleteAttr);
          tableRow.Cells.Add(ImageCell);
      }
  </code></pre>
  
  <p>and here is the event</p>
  
  <pre><code>    protected void imgBtndeleteAttr_Click(object sender, ImageClickEventArgs e)
      {
  
          ClientScript.RegisterClientScriptBlock(this.GetType(), "lnk",
             "&lt;script type = 'text/javascript'&gt;alert('Image button Clicked');&lt;/script&gt;");
      }
  </code></pre>