Connecting Tech Pros Worldwide Forums | Help | Site Map

Button click event not firing

Winista
Guest
 
Posts: n/a
#1: Feb 14 '06
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?





Peter Bromberg [C# MVP]
Guest
 
Posts: n/a
#2: Feb 14 '06

re: Button click event not firing


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:
[color=blue]
> 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?
>
>
>[/color]
Winista
Guest
 
Posts: n/a
#3: Feb 14 '06

re: Button click event not firing


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]" <pbromberg@yahoo.nospammin.com> wrote in message
news:F641EE14-159E-4F8D-BAE5-7E4EB878816F@microsoft.com...[color=blue]
> 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:
>[color=green]
>> 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?
>>
>>
>>[/color][/color]


Peter Bromberg [C# MVP]
Guest
 
Posts: n/a
#4: Feb 14 '06

re: Button click event not firing


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:
[color=blue]
> 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]" <pbromberg@yahoo.nospammin.com> wrote in message
> news:F641EE14-159E-4F8D-BAE5-7E4EB878816F@microsoft.com...[color=green]
> > 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:
> >[color=darkred]
> >> 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?
> >>
> >>
> >>[/color][/color]
>
>
>[/color]
Winista
Guest
 
Posts: n/a
#5: Feb 14 '06

re: Button click event not firing


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]" <pbromberg@yahoo.nospammin.com> wrote in message
news:8CF909ED-B92B-42CD-9BC8-C63847A2659D@microsoft.com...[color=blue]
> 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:
>[color=green]
>> 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]" <pbromberg@yahoo.nospammin.com> wrote in
>> message
>> news:F641EE14-159E-4F8D-BAE5-7E4EB878816F@microsoft.com...[color=darkred]
>> > 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?
>> >>
>> >>
>> >>[/color]
>>
>>
>>[/color][/color]


Closed Thread