How to create dynamic events handlers for Imagebuttons

  • Thread starter Thread starter RA
  • Start date Start date
R

RA

Hi

I have a dynamic asp.net table created from the database. I am adding an
ImageButton to each row so the client can click on it. Each ImageButton has
the ID = orderid from database. How can I receive the click event when the
user clicks one of the buttons. Eventually I would like to do the same
processing for all buttons depending on their ID.


Thanks,
Ronen
 
Hi Ronen,
If you create the buttons dynamically in the
Page_Initialize event then your page will be able to
receive click events from them. Creating them in the
Page_Load event (as most people try to do by default)
results in the events not being wired up.

alex
 
Back
Top