ASP.NET 2.0 PostBack Event not Firing

I’m developing Ajax enabled web application using asp.net 2.0 , having working for very long time, one fine day all button not working, all codes that suppose to fire after postback is not firing after page postback. I had no idea what happened, it might be web.config that I mis-configured, or JavaScript that conflict with my Ajax engine.

So I had decided to start a fresh Ajax enabled web application project, quickly drag and drop a button and a label, code the button with
[cc lang=”vbnet” escaped=”true”]Label1.Text = “Testing”[/cc]

Put a breakpoint on the only line of code for tracking, F5 run it and it just not hitting the breakpoint after the page is postback, it just simply postback for nothing! Quickly hand on another fresh pure ASP.NET web project, done the same thing and the same thing just keep happened.

Being so helpless for first time, looking over Internet for solution, most of the similar problem can be solved by reinstalling the IIS, the framework and using some properties for the button. I can’t solve mine here. Told my boss I need time to get it solved, right after told him, I remembered that I did some altering on my ASP.NET configuration in IIS during testing for localization. Quickly head back to the IIS and compared with the setting of the IIS that sits quietly on our network machine.

These are the steps taken to locate and fix the culprit:

  1. Right click on the Default Web Sites, select Properties
  2. On the Default Web Sites Properties, select ASP.NET tabs, and click on Edit Global Configuration.
  3. On the ASP.NET Configuration Settings, select Application tabs.
  4. The Request Encoding and Response Encoding is the culprit for everything, I had altered it to some other value and it not working, well changing it back bring everything back to life!!

12

 

Leave a Reply

Your email address will not be published. Required fields are marked *