I have come across some weird issues recently. When a button on our site is clicked sometimes it actions the request and sometimes it doesnt. Ive checked it with different browsers and the same applies no matter what browser i use. I cant seem to find a
pattern to replicate it locally as it only happens on live sites.
Does anyone have anyway/thoughts that i could use to narrow this problem down and see whats happening behind the scenes?
hi EssCee! well yes i was once caught with something like this after hours of wondering and asking for help at the end i found out that exception handling is one of the most basic and important weapon for almost every coder on this planet.
you just need to walk through all the code that is running behind this stubborn button may be sometimes the code runs, and other times there is an exception out there to surprise you, then it looks like the button is not working. do let me know.
Do you have the button in an updatepanel? If so, you could be seeing errors but they are getting swallowed by ajax. A good feature to use is asp.net tracing. You can turn this on in the web.config, and the trace log is visible in the trace.axd file (first
10 traces by default unless changed in the web.config). Using the trace log you can see if the button is actually posting back or making the request, and if so, did the page generate a 500 server error.
Don't forget to mark useful responses as Answer if they helped you towards a solution.
Marked as answer by Angie xu - MSFT on Jan 10, 2013 12:12 AM
I agree with Mark (above user). Also, it's possible that if you are using AJAX, your network connection is having some problems with partial requests. So try by changing your network connection too. Some firewalls sometimes blocks AJAX requests so it will
not trigger the click events.
EssCee
Member
548 Points
760 Posts
Button not responding
Jan 02, 2013 03:40 PM|LINK
I have come across some weird issues recently. When a button on our site is clicked sometimes it actions the request and sometimes it doesnt. Ive checked it with different browsers and the same applies no matter what browser i use. I cant seem to find a pattern to replicate it locally as it only happens on live sites.
Does anyone have anyway/thoughts that i could use to narrow this problem down and see whats happening behind the scenes?
Thanks
ramramesh
Member
458 Points
158 Posts
Re: Button not responding
Jan 02, 2013 04:02 PM|LINK
Please give your code
Khalid Khan
Member
151 Points
61 Posts
Re: Button not responding
Jan 02, 2013 04:14 PM|LINK
hi EssCee! well yes i was once caught with something like this after hours of wondering and asking for help at the end i found out that exception handling is one of the most basic and important weapon for almost every coder on this planet.
you just need to walk through all the code that is running behind this stubborn button may be sometimes the code runs, and other times there is an exception out there to surprise you, then it looks like the button is not working. do let me know.
rajaron
Member
657 Points
202 Posts
Re: Button not responding
Jan 02, 2013 04:28 PM|LINK
Most probably a JavaScript error. Try to check that first
EssCee
Member
548 Points
760 Posts
Re: Button not responding
Jan 02, 2013 04:42 PM|LINK
markfitzme
Star
14371 Points
2221 Posts
Re: Button not responding
Jan 02, 2013 05:18 PM|LINK
Do you have the button in an updatepanel? If so, you could be seeing errors but they are getting swallowed by ajax. A good feature to use is asp.net tracing. You can turn this on in the web.config, and the trace log is visible in the trace.axd file (first 10 traces by default unless changed in the web.config). Using the trace log you can see if the button is actually posting back or making the request, and if so, did the page generate a 500 server error.
Ruchira
All-Star
42904 Points
7022 Posts
MVP
Re: Button not responding
Jan 05, 2013 07:12 AM|LINK
Hello,
I agree with Mark (above user). Also, it's possible that if you are using AJAX, your network connection is having some problems with partial requests. So try by changing your network connection too. Some firewalls sometimes blocks AJAX requests so it will not trigger the click events.
My Tech blog | My YouTube ChannelPlease 'Mark as Answer' if this post helps you.geniusvishal
Star
14040 Points
2786 Posts
Re: Button not responding
Jan 05, 2013 07:24 AM|LINK
Is that button associated with some Javascript or AJAX control which might prevent the invoking of the buttons..
Here is a similar Issue discussed in this thread...
http://forums.asp.net/t/1857045.aspx/1?Save+button+on+web+form+only+works+intermittently
I recommend you to install firebug in your browser and then try to debug your javascript...
You can get firebug from here
My Website
www.dotnetvishal.com