How to create dynamic events handlers for Imagebuttons

Discussion in 'ASP .Net' started by RA, Dec 11, 2003.

  1. RA

    RA Guest

    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
     
    RA, Dec 11, 2003
    #1
    1. Advertisements

  2. RA

    alex bowers Guest

    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
     
    alex bowers, Dec 11, 2003
    #2
    1. Advertisements

  3. RA

    RA Guest

    How can I tie them all to the same event handler?
     
    RA, Dec 11, 2003
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.