Event Not Firing

Discussion in 'ASP .Net' started by jeff_mishima, Oct 3, 2005.

  1. jeff_mishima

    jeff_mishima Guest


    I've got an issue with a dynamically assigned event not actually being
    assigned correctly to a linkbutton- or at least that appears to be the

    The linkbutton doesn't work on 1st click, but does on 2nd click.

    I've tried assigning the event as early in the page cycle as possible
    (in OnInit() for example), calling the event-assigning function more
    than once- all to no avail.

    I've also stepped through the event-assigning function and it does
    appear to be executing the event assignment for the linkbutton-
    however, the first click on the lb does not do anything.

    However, the event *does* fire on the 2nd click (after doing a

    Any ideas or suggestions are much appreciated.


    jeff_mishima, Oct 3, 2005
    1. Advertisements

  2. jeff_mishima

    Guest Guest

    Try throwing the event into the page_load (making sure NOT to put it into an
    IsPostBack() check... see if that makes any difference.
    Otherwise, you will probably have to show the pertinate code.
    Guest, Oct 3, 2005
    1. Advertisements

  3. The easiest way to debug this would be to disable Smartnavigation (if you
    have it enabled) and then browse to the page and do a ViewSource. The
    Linkbutton should have the proper JavaScript code to raise the Event during
    Postback. You can check the code the first time (you had mentioned that it
    did not work) and then the code the second time (just before it actually
    worked). The difference in this code will shed some light as to how ASP.NET
    is working behind the scene and if you could post that then someone could
    take it from there.



    Trevor Benedict R
    Trevor Benedict R, Oct 3, 2005
    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.