An ASP.NET Blog
I work for Microsoft and help people and businesses make better use of technolgy to realize their full potential. The opinions mentioned herein are solely mine and do not reflect those of my employer.

Button Click Events not firing ? - ASP.NET

Monday, April 25, 2005 8:00 AM
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.

Feedback

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

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 8/9/2005 6:07 AM | Mohamed Faramawi

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

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 8/9/2005 6:16 AM | Mohamed Faramawi

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

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
10/7/2005 11:43 AM | Manas

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

good sollution 10/27/2005 1:10 AM | Huy

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

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

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

lajs;lfksjdfs 12/5/2005 9:09 PM | Lily

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

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. 2/1/2006 1:53 PM | Kyle

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

I could get the validation working on Internet Explorer, but it's not working on Mozilla.
For Mozilla use the IsValid method server-side.

3/13/2006 4:56 PM | Ajay

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

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. 5/22/2006 2:21 AM | lucky

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

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 9/18/2006 9:39 AM | Fraijo

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

it is worked.. thanks a lot.. 9/18/2006 10:16 AM | Fraijo

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

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?!? 10/22/2006 11:07 PM | Mesk

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

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... 3/5/2007 10:36 PM | sang

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

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 4/6/2007 6:42 AM | umakanth

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

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. 4/13/2007 6:01 AM | Meera

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

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. 8/1/2007 1:55 AM | Abu Taher

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

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. 11/21/2007 10:42 PM | Jaydeep

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

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 1/3/2008 4:49 PM | Chandresh Tekchandani

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

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

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

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 2/5/2008 5:15 PM | Shiva

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

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? 2/12/2008 8:04 PM | maryam saboor

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

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! 2/15/2008 5:03 PM | maryam saboor

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

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

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

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!! 4/22/2008 7:42 PM | maryam saboor

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

Extrmly Goood solution thanks alot 6/2/2008 7:43 PM | pravesh

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

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. 6/11/2008 4:55 AM | Diana Benobo

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

dfsd 7/20/2008 6:13 PM | ewe

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

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. 7/31/2008 6:49 AM | Aaron Dyer

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

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. 7/31/2008 6:49 AM | Aaron Dyer

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

Worked for me thanks 8/20/2008 7:16 AM | Ben

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

ssss 8/25/2008 7:24 PM | s

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

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

Post a comment





 

Please add 2 and 6 and type the answer here: