Button Click Events not firing ? - ASP.NET

Hi,

You may be unable to see the button click events firing on certain machines though it may work in some other machines.

Mostly when you are developing in your local system, the events do work well. But once you move the code to production, the button click events may not fire at all.

This might rise after you install the Microsoft .NET Framework Service Pack 1, which will stop the PostBack Events on client side validation.

To resolve this issue, the aspnet_client folder needs to be reinstalled. To do that type the following from command prompt:-

%windir%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -c

This should resolve the issue.

The above command applies to .NET Framework version 1.1. For 1.0, you need to change the version to v1.0.3705 in the above command.

Thanks.

posted @ Monday, April 25, 2005 8:00 AM

Print

Comments on this entry:

# re: Button Click Events not firing ? - ASP.NET

Left by Mohamed Faramawi at 8/9/2005 6:07 AM
Gravatar
Hi, i was recentely facing the problem u are stating above, the problem is the button event wasn't firing when i open the page with IE, but with FireFox the button works fine, ur solution sloved the problem for IE, but why i don't understand is, if it was about IIS and .NET framework, why the event is fired with FireFox and not with IE!!!
thnx alot
Mohamed Faramawi, medo_82@hotmail.com

# re: Button Click Events not firing ? - ASP.NET

Left by Mohamed Faramawi at 8/9/2005 6:16 AM
Gravatar
i guess i figured out why the even fired with FireFox but not with IE, its bcoz the validation, IE validate controls b4 the submit is done, on the other side, FireFox validate controls after submit, its about which called first,i dunno if i'm right or wrong, but i noticed that with FireFox validatros works after submiting the form,i'm dig down in this issue later i guess , ty there
Mohamed Faramawi,medo_82@hotmail.com

# re: Button Click Events not firing ? - ASP.NET

Left by Manas at 10/7/2005 11:43 AM
Gravatar
thanks for the help,
while using this command i got a error which says :
An error has occurred (0x80070005).
You must have administrative rights on this machine in order to run this tool.

to resolve it try the following, it works:

1. Find the "system_web" directory under wwwroot. Under it, you should find a directory named "1_1_4322". Delete it.

2. Run aspnet_regiis -ea from drive:\windowsdirectory\Microsoft.NET\Framework\v1.1.4322. That should kill all old
1.1.4322 scripts.

3. Then, run aspnet_regiis –c. That should re-install the 1_1_4322 directory and client scripts.

thanks again,
regards
Manas

# re: Button Click Events not firing ? - ASP.NET

Left by Huy at 10/27/2005 1:10 AM
Gravatar
good sollution

# re: Button Click Events not firing ? - ASP.NET

Left by surendra at 11/18/2005 6:43 AM
Gravatar
i m using command button on webform to open and excel sheet using interop assembly
but nothing happens. any idea?

# re: Button Click Events not firing ? - ASP.NET

Left by Kyle at 2/1/2006 1:53 PM
Gravatar
Thank you so much for this information. I just moved my new .NET application to our production server and, oh no, the buttons stopped firing. When I applied the aspnet_regiis -c command, the buttons worked again.
Thanks, so much.
Kyle.

# re: Button Click Events not firing ? - ASP.NET

Left by Ajay at 3/13/2006 4:56 PM
Gravatar
I could get the validation working on Internet Explorer, but it's not working on Mozilla.
For Mozilla use the IsValid method server-side.

# re: Button Click Events not firing ? - ASP.NET

Left by lucky at 5/22/2006 2:21 AM
Gravatar
Guys, if you using asp.net 2.0 and facing an issue like, button click not working on the webcontrol, try submitbehaviour property. it worked for me. set it off.

# re: Button Click Events not firing ? - ASP.NET

Left by Fraijo at 9/18/2006 9:39 AM
Gravatar
i've the same problem. but here only in one page has the same problem. all other buttons in other pages is working fine. this happend after the client reinstalled their Os to windows server 2003 R2. Enterprise Edition here we're using the old one server2003 Enterprise Edition.. is the above are applicable to this also? pls reply. .i need it urgently.. thanks in advance

# re: Button Click Events not firing ? - ASP.NET

Left by Fraijo at 9/18/2006 10:16 AM
Gravatar
it is worked.. thanks a lot..

# re: Button Click Events not firing ? - ASP.NET

Left by Mesk at 10/22/2006 11:07 PM
Gravatar
I am using asp.net 2.0 and i have the same problem with the event submit buttons. How can i solve this problem? How can i use submitbehaviour like AM LUCKY said?!?

# re: Button Click Events not firing ? - ASP.NET

Left by sang at 3/5/2007 10:36 PM
Gravatar
HI, I am having the problem very frequently on the production server.
To resolve this issue, I normally do the following. Reinstall aspnet_client folder. To do that I use this command in command prompt:-
%windir%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -c

But my concern is how to resolve this problem permanently. Since this is an issue on the production server. Need help. It's urgent. Thanks in advance...

# re: Button Click Events not firing ? - ASP.NET

Left by umakanth at 4/6/2007 6:42 AM
Gravatar
Hai..guys...i'm facing the same problem i.e, button click events are not firing. Actually it worked fine in 3 days back,but suddenly stoppped.In IE it is not working,but in FF it is working(in FF designing is not good).I did the same things specified above...but..no...solution..

thanks

# re: Button Click Events not firing ? - ASP.NET

Left by Meera at 4/13/2007 6:01 AM
Gravatar
Hi,

We have tried the above solution, but still our problem is not resolved. we even tried UseSubmitBehaviour set to Off. One of our application is working properly on same server in IE, but we are facing problem perticularly for this application.

# re: Button Click Events not firing ? - ASP.NET

Left by Abu Taher at 8/1/2007 1:55 AM
Gravatar
Hi,
I was breaking my head for whole day wondering the reason.Then I got your suggestion.I tried it and it solved my problem.

Thanks.

# re: Button Click Events not firing ? - ASP.NET

Left by Jaydeep at 11/21/2007 10:42 PM
Gravatar
Hi,
i was recentely facing the problem u are stating above, the problem is the button event wasn't firing when i open the page with IE, but with FireFox the button works fine.

# re: Button Click Events not firing ? - ASP.NET

Left by Chandresh Tekchandani at 1/3/2008 4:49 PM
Gravatar
I have a function it is too bulky I have to run that function at that time when the traffic is low and it should run at back end
do you have any sollution

# re: Button Click Events not firing ? - ASP.NET

Left by Chandresh Tekchandani at 1/28/2008 4:16 PM
Gravatar
In crystal viewer the images are not dispalyed when uploaded. Is there any component missing or I have to do something extra

# re: Button Click Events not firing ? - ASP.NET

Left by Shiva at 2/5/2008 5:15 PM
Gravatar
hey i have the same problem, bt if i run that in command promt i am shown that its not a recogonized internal or external batch file...
help me

# re: Button Click Events not firing ? - ASP.NET

Left by maryam saboor at 2/12/2008 8:04 PM
Gravatar
Hi,
I have a web custom control which has some textboxes and i have used .net "RequiredFieldValidator"s to check their validation, I have a Submit button which when is clicked, the TextBoxes texts store in a data base table. to this point every thing is ok but when i run a project which contains this control, the first time I fill the textboxes and click the button it doesn't work but the second time it works!!. I checked if I have no alidation controling and i works ok then but if I enable the validations the problem is there agin. do you know what is the solution?

# re: Button Click Events not firing ? - ASP.NET

Left by maryam saboor at 2/15/2008 5:03 PM
Gravatar
Hi again
I found my answer, but I post it here if some one else has the same problem. I noticed that if we have some "RequiredFieldValidators" in a web custom composite control, we should set an ID value for each of the components in it so the problem disappears!

# Button Click Events not firing on Some System ? - ASP.NET

Left by Taran at 4/14/2008 3:19 AM
Gravatar
HI,
Button Click Event is not firing untill or unless we dnt press f5 button
Please help me

# re: Button Click Events not firing on Some System ? - ASP.NET

Left by maryam saboor at 4/22/2008 7:42 PM
Gravatar
Hi
would you please tell us a little more about your code and your problem? normaly you shouldn't have such a problem unless you have set somthing in your code causing this!!

# re: Button Click Events not firing ? - ASP.NET

Left by pravesh at 6/2/2008 7:43 PM
Gravatar
Extrmly Goood solution thanks alot

# re: Button Click Events not firing ? - ASP.NET

Left by Diana Benobo at 6/11/2008 4:55 AM
Gravatar
I found that manually copying the aspnet_client folder to the target application root also worked. The file source was on a remote server, so there was some permissions issue that prevented the aspnet_regiis application from writing to the remote machine even though the login was an administrative login on both machines.

# re: Button Click Events not firing ? - ASP.NET

Left by Aaron Dyer at 7/31/2008 6:49 AM
Gravatar
I struggled with this for two days. Eventually I found that a) if I disabled all validators it worked. But I also discovered that b) if I put an entry in the ValidationGroup property for them all it also worked when I re-enabled them. I did this because I am updating a database. I gutted the event proc except for a test alert. Since I wanted it in the form it should be just in case it actually hit the database I enabled them all and put them in groups, thinking that should make sense. If that didn't work I would then disable the validators again and put the database code back in. Fortunately that was not necessary.

# re: Button Click Events not firing ? - ASP.NET

Left by Aaron Dyer at 7/31/2008 6:49 AM
Gravatar
I struggled with this for two days. Eventually I found that if I disabled all validators it worked. But I also discovered that if I put an entry in the ValidationGroup property for them all it also worked when I re-enabled them. I did this because I am updating a database. I gutted the event proc except for a test alert. Since I wanted it in the form it should be just in case it actually hit the database I enabled them all and put them in groups, thinking that should make sense. If that didn't work I would then disable the validators again and put the database code back in. Fortunately that was not necessary.

# re: Button Click Events not firing ? - ASP.NET

Left by Ben at 8/20/2008 7:16 AM
Gravatar
Worked for me thanks

# re: Button Click Events not firing ? - ASP.NET

Left by Ravi at 9/4/2008 6:07 PM
Gravatar
Thanks a lot Manas.....
Now Button click is working fine in both IE and Firefox

# re: Button Click Events not firing ? - ASP.NET

Left by logica pvt limited at 9/16/2008 12:19 AM
Gravatar
This really helped. Thank you so very much.

# re: Button Click Events not firing ? - ASP.NET

Left by arun at 9/18/2008 7:58 PM
Gravatar
Check the below url for details

http://codekeep.net/snippets/9b1d8e28-bd4d-48c7-b64e-f3d7da976dfb.aspx

# re: Button Click Events not firing ? - ASP.NET

Left by Eduardo Sanchez at 10/21/2008 1:33 AM
Gravatar
Thanks a lot, i have that problem and i resolve with that answer... This really helped thanks!

# re: Button Click Events not firing ? - ASP.NET

Left by andrew at 10/31/2008 7:27 PM
Gravatar
Thanks for the idea, but my problem was caused because a button was not being rendered inside the <form> tags - so there was no parent form to submit. Kind of stupid, but with contractor's you get what you pay for.

# re: Button Click Events not firing ? - ASP.NET

Left by mahalakshmisethu at 11/13/2008 1:19 PM
Gravatar
Hi,

i am working with .NET 3.5. i am getting the same problem. the button_click event is not working in IE. but it works in Firefox.Three days before it was working fine with IE. In .NET 3.5 there is no aspnet_regiis.exe. how can i solve this issue? its very urgent please give me any solution.

# re: Button Click Events not firing ? - ASP.NET

Left by şişme bebek at 11/20/2008 1:24 PM
Gravatar
i am working with .NET 3.5. i am getting the same problem. the button_click event is not working in IE. but it works in Firefox.Three days before it was working fine with IE. In .NET 3.5 there is no aspnet_regiis.exe. how can i solve this issue? its very urgent please give me any

# re: Button Click Events not firing ? - ASP.NET

Left by azdırıcı at 11/30/2008 4:14 PM
Gravatar
I struggled with this for two days.

# re: Button Click Events not firing ? - ASP.NET

Left by Joe at 1/1/2009 1:51 AM
Gravatar
This had me for several hours before I realized it was related to the google search. I had simply copied and pasted the code provided by google, which has a form tag in it. You can't do this with asp.net.

Anyone having problems where your buttons don't work in IE but do in other browswers, make sure you don't have any form tags other than the single form tag that is set to run at the server.

# re: Button Click Events not firing ? - ASP.NET

Left by Mohd Javed at 1/16/2009 11:58 AM
Gravatar
Very good Articles.

# re: Button Click Events not firing ? - ASP.NET

Left by bom at 2/5/2009 5:50 PM
Gravatar
Hey I have problem,that onclick event of asp.net button gets fired first time,but second time it doesn't work.Please help me.

# re: Button Click Events not firing ? - ASP.NET

Left by jooby at 2/19/2009 1:15 AM
Gravatar
Thank you. After a day of pain wondering what I was doing wrong with every control I tried, I discovered after reading these posts that things were working just fine in FireFox (but not IE) and there was a <form> that was screwing things up. The surprise is that the <form> tag had been in the .aspx page for months and not causing problems, but it started to do so after I added some other server side controls to the page.

# re: Button Click Events not firing ? - ASP.NET

Left by JM at 3/20/2009 6:55 AM
Gravatar
Great post! Been looking for this solution for the past 2 days. For me It was the Google Search causing problem in IE. Thanks Joe!

# re: Button Click Events not firing ? - ASP.NET

Left by satya at 4/21/2009 8:40 PM
Gravatar
Mahalakshmi i'm experiencing the same error as you are using .NET 3.5 just checking if u found any solution for this

# re: Button Click Events not firing ? - ASP.NET

Left by fe at 6/5/2009 9:19 PM
Gravatar
very useful tip. I also have a problem where the button events are not firing and i just reinstalled the aspnet_client as instructed above and it worked. Thanks.

# re: Button Click Events not firing ? - ASP.NET

Left by kiran at 6/11/2009 11:58 AM
Gravatar
Thanks for the post. I searched for 2 days and was beating my head why it isnt working

This worked when i copied the folder from C:\Inetpub\wwwroot\aspnet_client\system_web and replaced to the server

# re: Button Click Events not firing ? - ASP.NET

Left by Bruno at 6/28/2009 8:07 PM
Gravatar
Thanks a lot Joe, the google search was causing my problem

# re: Button Click Events not firing ? - ASP.NET

Left by atul at 7/21/2009 7:17 AM
Gravatar
I am facing the problem in asp.net. When i do client side validdation in javascript, on button click. button click event not fire. and without client side validation it is fired.

# re: Button Click Events not firing ? - ASP.NET

Left by Avik Shee at 7/22/2009 6:46 AM
Gravatar
Thanks a lot..............You have saved my job.....

# Our solution to Button Click Events not firing ? - ASP.NET

Left by RJ at 7/23/2009 8:32 AM
Gravatar
I had this same problem. In this case we had .net 2.0 and our imagebuttons were not working. The CAUSE was another <form> element inside the asp.net form. IE seems to not like this. Our SOLUTION was to remove the other form and used javascript to exec it instead (get the element values from the input fields and send to a function to process).

# re: Button Click Events not firing ? - ASP.NET

Left by jl at 7/28/2009 7:48 PM
Gravatar
I had same problem. My button click did not fire when click on IE 7. My vb.net application works normal until last Friday. The source code never changed. I tried re-install aspnet_regiis. I also checked the <form> tag is in right place. Please help me.

# re: Button Click Events not firing ? - ASP.NET

Left by Pete at 8/20/2009 6:28 AM
Gravatar
I don't have aspnet_regiis in the v1.1.4322 directory ??

I'm having the same problem with .NET 2. I have confirmed there are no other form elements on the page.

# re: Button Click Events not firing ? - ASP.NET

Left by aravind devaraj at 8/21/2009 6:20 AM
Gravatar
Very Good Solution, Helped a lot

# Solution : Button Click Events not firing ? - ASP.NET

Left by Atul Rane at 9/10/2009 5:52 PM
Gravatar
Hi friend, I just remove the required field validator and the problem is solved but I don’t know why the button click problem is related with validator control.

# re: Button Click Events not firing ? - ASP.NET

Left by Gregfox at 9/16/2009 9:56 PM
Gravatar
Hello,

Please help me ASAP!!..

Right Now, I was currently facing the problem u are stating above, the problem is the button event wasn't firing when i open the page with IE, but with FireFox the button works fine.

Please see below the link of my staging site:
http://twistcreativetips.com/newtemp

Thanks and advanced,
Greg





# re: Button Click Events not firing ? - ASP.NET

Left by Vikrant at 9/21/2009 6:36 AM
Gravatar
I had this same problem. In this case we had .net 2.0 and our imagebuttons were not working. I also checked the <form> tag is in right place.
Please help me.

# re: Button Click Events not firing ? - ASP.NET

Left by mario oyunları at 9/21/2009 10:48 AM
Gravatar
all other buttons in other pages is working fine. this happend after the client reinstalled their Os to windows server 2003 R2. Enterprise Edition here we're using the old one server2003 Enterprise Edition..

Your comment:



 (will not be displayed)


 
 
 
 
 

Live Comment Preview:

 
«November»
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345