new ImageButton - no click event called

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mihai

    new ImageButton - no click event called

    Hi,

    I am trying to create a list of record every with an ImageButton
    attached.

    The code is like this:

    ImageButton img = new ImageButton();
    img.ImageUrl = "imgs/ok.bmp";
    img.Visible = true;
    img.ID = r_id.ToString() ;
    img.Click += new
    System.Web.UI.I mageClickEventH andler(this.sel ect_Click);
    Page.Form.Contr ols.Add(img);

    The problem is that select_Click is never called at click event;
    Other thing is that the code is triggered by another button click,
    so is not in Page_Load() function.

    Thank you!
Working...