473,775 Members | 2,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Button click event not firing

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?
Feb 14 '06 #1
4 3479
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?

Feb 14 '06 #2
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]" <pb*******@yaho o.nospammin.com > wrote in message
news:F6******** *************** ***********@mic rosoft.com...
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?

Feb 14 '06 #3
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.ne t) 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]" <pb*******@yaho o.nospammin.com > wrote in message
news:F6******** *************** ***********@mic rosoft.com...
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?


Feb 14 '06 #4
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]" <pb*******@yaho o.nospammin.com > wrote in message
news:8C******** *************** ***********@mic rosoft.com...
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.ne t)
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]" <pb*******@yaho o.nospammin.com > wrote in
message
news:F6******** *************** ***********@mic rosoft.com...
> 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?
>>
>>
>>


Feb 14 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1325
by: Big_Stu | last post by:
Hi all, I have an <asp:button> inside an <asp:table> and I am finding that the button click event doesn't fire at all! I have added the button to the initialize component event, and the table. The event fires when I change the access modifier to Protected, from Private, but then it fires only every so often, and there is no pattern. Can anybody tell me what is happening, why and what I need to do?
6
2855
by: Michael Johnson Jr. | last post by:
I am trying to handle a button click event, which updates a web control table with data. The button is dynamically created in the table itself. When I call updateTable() in the Page_Load the new data from the button is not available at this time as to allow the table to properly update. So basically, I need to call UpdateTable() twice, once from page load and once from button. This causes problems with my application, and I was trying...
2
1959
by: adolf garlic | last post by:
I'm having a problem with a button click event being fired erroneously. My login.aspx page has the usual username/password boxes. There is also a link to click when you have filled these, plus a 'remember me' checkbox. Further down the page we have a 'email me my password' button. In addition there is also a small piece of client side script to handle the user pressing the 'enter' key (this has the same effect as clicking the
1
1774
by: bradw2k | last post by:
I have one frame that needs to cause a button click event on another frame. I was trying to do this by putting a display:none LinkButton on the target frame, and having a javascript on that page that can be called by the remote frame, and the javascript would say btn.click() ... but that doesn't cause the form to submit. How can I accomplish what I am after (firing the event for the specified button when triggered from a remote frame)? ...
0
2041
by: nraji | last post by:
hi, I have designed a web part using VS 2003 (Web control library template). I need to publish that in share point. Its not like drag and drop the things from toolbar. Every thing I need to do in code behind side. I have a button and text box Button Id: btnSearch TextBox id: txtSearch
7
6870
by: =?Utf-8?B?bWFydGluMQ==?= | last post by:
Hi, All, I create button in the code ( Dim Button as new Button), not using button web component (means not drap button and drop it ont he webform), after that I try to use button_click event, it is not work, anyone can tell how to use button click event ? Thanks in advance, Martin
3
21175
by: GauravGupta | last post by:
i want to know that is it posible to call button click event before page load event on post back.... please help me....
1
2353
by: =?Utf-8?B?QXNhZg==?= | last post by:
Hello, I have a Default.aspx page with several controls in a Master Page. When pressing on a Button control Page_Load event is fired on the Default.aspx page and after that the Page_Load event on the Master Page is fired but it does not go to the Button event in the first button press but only on the second press on the button. I can't find out why Button Click event is firing only on the second press and not on the first press where...
0
2901
by: ADN | last post by:
Hi, I am currently extending the GridView control and would like to add a button to the GridView so that it will automatically render one button at the top of the grid. I have a click event for that button, but everytime the button is clicked, the page posts back and the click event does not fire (probably because the button gets created every single time there's a postback). What is the best way for me to create this button and then...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10270
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10109
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9916
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8939
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7464
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6718
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4017
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.