Ajax updatepanel SharePoint 2007
At a customer place we had issue’s after deploying a page with an Ajax updatepanel, on the development en test environment everything worked fine but on the customer’s acceptance and production environment the first postback in the updatepanel worked but after that the updatepanel didn’t react anymore.
After my collegue and I found the blog post of Mike Ammerlaan we could solve the problem pretty fast.
from Mike Ammerlaan’s Blog:
Using UpdatePanels within SharePoint
UpdatePanels are a very useful addition to ASP.NET AJAX, and represent the simplest way to convert existing, standard ASP.NET controls and parts to take advantage of Ajax techniques. However, there are some changes within Windows SharePoint Services which may get in the way of working with ASP.NET AJAX.
Windows SharePoint Services JavaScript has a “form onSubmit wrapper” which is used to override the default form action. This work is put in place to ensure that certain types of URLs, which may contain double byte characters, will fully work across most postback and asynchronous callback scenarios. However, if your scenarios do not involve double byte character URLs, you may successful disable this workaround and gain the ability to use ASP.NET AJAX UpdatePanels.
For the page’s were we needed the updatepanel we placed the following script:
«/span>script type=“text/javascript”> </script>
Most important of this script is that the fix needs to be applied after every pageload, otherwise only the first postback works fine.