Mar 8, 2011

Update panel not working in Sharepoint

After several hours of investigating why my simple HelloWorld UpdatePanel didn't work in Sharepoint, despite having installed the Sharepoint Guidance package and enabling the SafeScriptManager and changing the web.config for AJAX controls, I came across the following blog post:

http://msmvps.com/blogs/shareblog/archive/2009/04/29/update-panel-not-working-like-you-expect.aspx

Turns out that there is an error in the BlueBand master page (the one I was using) that broke the postback mechanism for UpdatePanels. Changing master pages fixed the problem.

Specifically:


<body class="body" onload="BLOCKED SCRIPT_spBodyOnLoadWrapper();">
<webpartpages:spwebpartmanager runat="server">
<form runat="server" onsubmit="return _spFormOnSubmitWrapper();">

Should be:

<body class="body" onload="BLOCKED SCRIPT_spBodyOnLoadWrapper();">
<form runat="server" onsubmit="return _spFormOnSubmitWrapper();">
<webpartpages:spwebpartmanager runat="server">

1 comment:

  1. simple fix for a problem I was struggling with for a few hours. Thanks so much!

    ReplyDelete