Button click event not firing

Discussion in 'ASP .Net' started by Winista, Feb 14, 2006.

  1. Winista

    Winista Guest

    I have a page with bunch of user controls and standard controls on the page.
    And then I have a Button control on the page which is used to save the data
    on server side. All was working fine and dandy till yesterday. Today the
    button click event started showing some weired behavior. Some time the code
    will not get into that handler. And I have tracked down the pattern when it
    is not working.
    I have 2 combo box controls on the page which trigger AJAX requests when
    selection is changed in them. And these AJAX calls propulate few other
    controls when response comes back. When any of these AJAX calls get
    triggered, after that if page initiates a post back, then the button's click
    handler never gets called.

    Any idea what could be going wrong?
     
    Winista, Feb 14, 2006
    #1
    1. Advertising

  2. Sounds like your "AJAX" is foaming a bit much, and clobbering the
    __doPostback javascript code in the page.

    Peter

    --
    Co-founder, Eggheadcafe.com developer portal:
    http://www.eggheadcafe.com
    UnBlog:
    http://petesbloggerama.blogspot.com




    "Winista" wrote:

    > I have a page with bunch of user controls and standard controls on the page.
    > And then I have a Button control on the page which is used to save the data
    > on server side. All was working fine and dandy till yesterday. Today the
    > button click event started showing some weired behavior. Some time the code
    > will not get into that handler. And I have tracked down the pattern when it
    > is not working.
    > I have 2 combo box controls on the page which trigger AJAX requests when
    > selection is changed in them. And these AJAX calls propulate few other
    > controls when response comes back. When any of these AJAX calls get
    > triggered, after that if page initiates a post back, then the button's click
    > handler never gets called.
    >
    > Any idea what could be going wrong?
    >
    >
    >
     
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Feb 14, 2006
    #2
    1. Advertising

  3. Winista

    Winista Guest

    I have already gone thorugh that process of debugging __doPostBack. That
    method is fine. I have infact tried to force a __doPostBack call onClick
    handler on button, even that does not work. __EVENTTARGET value is set
    correctly to ID of that button but it seems that button's event handler has
    disappeared from the control tree.


    "Peter Bromberg [C# MVP]" <> wrote in message
    news:...
    > Sounds like your "AJAX" is foaming a bit much, and clobbering the
    > __doPostback javascript code in the page.
    >
    > Peter
    >
    > --
    > Co-founder, Eggheadcafe.com developer portal:
    > http://www.eggheadcafe.com
    > UnBlog:
    > http://petesbloggerama.blogspot.com
    >
    >
    >
    >
    > "Winista" wrote:
    >
    >> I have a page with bunch of user controls and standard controls on the
    >> page.
    >> And then I have a Button control on the page which is used to save the
    >> data
    >> on server side. All was working fine and dandy till yesterday. Today the
    >> button click event started showing some weired behavior. Some time the
    >> code
    >> will not get into that handler. And I have tracked down the pattern when
    >> it
    >> is not working.
    >> I have 2 combo box controls on the page which trigger AJAX requests when
    >> selection is changed in them. And these AJAX calls propulate few other
    >> controls when response comes back. When any of these AJAX calls get
    >> triggered, after that if page initiates a post back, then the button's
    >> click
    >> handler never gets called.
    >>
    >> Any idea what could be going wrong?
    >>
    >>
    >>
     
    Winista, Feb 14, 2006
    #3
  4. OK. Well you didn't say which "AJAX" framework you are using, but maybe you
    might want to check with the author(s).
    I've used Anthem.net which is very light and scalable (Sourceforge.net) and
    have never seen any posts to that effect.
    Anthem.net is one of the few (like Atlas) that preserves the stateful
    ASP.NET page and does not rely on external handlers.
    Peter

    --
    Co-founder, Eggheadcafe.com developer portal:
    http://www.eggheadcafe.com
    UnBlog:
    http://petesbloggerama.blogspot.com




    "Winista" wrote:

    > I have already gone thorugh that process of debugging __doPostBack. That
    > method is fine. I have infact tried to force a __doPostBack call onClick
    > handler on button, even that does not work. __EVENTTARGET value is set
    > correctly to ID of that button but it seems that button's event handler has
    > disappeared from the control tree.
    >
    >
    > "Peter Bromberg [C# MVP]" <> wrote in message
    > news:...
    > > Sounds like your "AJAX" is foaming a bit much, and clobbering the
    > > __doPostback javascript code in the page.
    > >
    > > Peter
    > >
    > > --
    > > Co-founder, Eggheadcafe.com developer portal:
    > > http://www.eggheadcafe.com
    > > UnBlog:
    > > http://petesbloggerama.blogspot.com
    > >
    > >
    > >
    > >
    > > "Winista" wrote:
    > >
    > >> I have a page with bunch of user controls and standard controls on the
    > >> page.
    > >> And then I have a Button control on the page which is used to save the
    > >> data
    > >> on server side. All was working fine and dandy till yesterday. Today the
    > >> button click event started showing some weired behavior. Some time the
    > >> code
    > >> will not get into that handler. And I have tracked down the pattern when
    > >> it
    > >> is not working.
    > >> I have 2 combo box controls on the page which trigger AJAX requests when
    > >> selection is changed in them. And these AJAX calls propulate few other
    > >> controls when response comes back. When any of these AJAX calls get
    > >> triggered, after that if page initiates a post back, then the button's
    > >> click
    > >> handler never gets called.
    > >>
    > >> Any idea what could be going wrong?
    > >>
    > >>
    > >>

    >
    >
    >
     
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Feb 14, 2006
    #4
  5. Winista

    Winista Guest

    I don't use any third party fraeworks. I have built our own that we have
    been using for quite some time without any issues.
    And the framework does not POST to the same page. The request is sent to
    separate handler pages.
    I guess I will have to little bit more diging into the state of the page and
    see where the event is getting lost.

    thanks

    "Peter Bromberg [C# MVP]" <> wrote in message
    news:...
    > OK. Well you didn't say which "AJAX" framework you are using, but maybe
    > you
    > might want to check with the author(s).
    > I've used Anthem.net which is very light and scalable (Sourceforge.net)
    > and
    > have never seen any posts to that effect.
    > Anthem.net is one of the few (like Atlas) that preserves the stateful
    > ASP.NET page and does not rely on external handlers.
    > Peter
    >
    > --
    > Co-founder, Eggheadcafe.com developer portal:
    > http://www.eggheadcafe.com
    > UnBlog:
    > http://petesbloggerama.blogspot.com
    >
    >
    >
    >
    > "Winista" wrote:
    >
    >> I have already gone thorugh that process of debugging __doPostBack. That
    >> method is fine. I have infact tried to force a __doPostBack call onClick
    >> handler on button, even that does not work. __EVENTTARGET value is set
    >> correctly to ID of that button but it seems that button's event handler
    >> has
    >> disappeared from the control tree.
    >>
    >>
    >> "Peter Bromberg [C# MVP]" <> wrote in
    >> message
    >> news:...
    >> > Sounds like your "AJAX" is foaming a bit much, and clobbering the
    >> > __doPostback javascript code in the page.
    >> >
    >> > Peter
    >> >
    >> > --
    >> > Co-founder, Eggheadcafe.com developer portal:
    >> > http://www.eggheadcafe.com
    >> > UnBlog:
    >> > http://petesbloggerama.blogspot.com
    >> >
    >> >
    >> >
    >> >
    >> > "Winista" wrote:
    >> >
    >> >> I have a page with bunch of user controls and standard controls on the
    >> >> page.
    >> >> And then I have a Button control on the page which is used to save the
    >> >> data
    >> >> on server side. All was working fine and dandy till yesterday. Today
    >> >> the
    >> >> button click event started showing some weired behavior. Some time the
    >> >> code
    >> >> will not get into that handler. And I have tracked down the pattern
    >> >> when
    >> >> it
    >> >> is not working.
    >> >> I have 2 combo box controls on the page which trigger AJAX requests
    >> >> when
    >> >> selection is changed in them. And these AJAX calls propulate few other
    >> >> controls when response comes back. When any of these AJAX calls get
    >> >> triggered, after that if page initiates a post back, then the button's
    >> >> click
    >> >> handler never gets called.
    >> >>
    >> >> Any idea what could be going wrong?
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>
     
    Winista, Feb 14, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Purvi T
    Replies:
    0
    Views:
    900
    Purvi T
    Oct 19, 2004
  2. Ken Cox [Microsoft MVP]

    Button Click event not firing

    Ken Cox [Microsoft MVP], Apr 28, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,563
    Andrea Williams
    Apr 28, 2004
  3. Amy
    Replies:
    0
    Views:
    1,015
  4. GauravGupta
    Replies:
    4
    Views:
    2,146
    Shilpa1234
    Jan 19, 2012
  5. Max2006
    Replies:
    2
    Views:
    1,618
    Walter Wang [MSFT]
    Sep 19, 2007
Loading...

Share This Page