Using the AJAX Update Panel in SharePoint
You want to use the AJAX UpdatePanel control on a SharePoint page or in a Web Part even though, by default, this control does not work with these standard SharePoint components because of differences in the postback mechanisms that are used by SharePoint and ASP.NET.
In Visual Studio, add a reference to Microsoft.Practices.SPG.AJAXSupport.dll. Add a SafeScriptManager control to your page and set the EnableUpdatePanelSupport flag to true. This changes the postback script that is needed for the UpdatePanel control to work in a SharePoint environment. The following code demonstrates how to add a SafeScriptManager control to a page.
<%@ Register Assembly="Microsoft.Practices.SPG.AJAXSupport, Version=220.127.116.11, Culture=neutral, PublicKeyToken=8768CCAE1C3C9EB2" TagPrefix="spg" Namespace="Microsoft.Practices.SPG.AJAXSupport.Controls" %> <spg:SafeScriptManager ID="SafeScriptManager" runat="server" EnableUpdatePanelSupport = “True” /> <asp:UpdatePanel runat=”Server” id=”MyUpdatePanel”> ... </asp:UpdatePanel>
You may place several SafeScriptManager controls on your page, and it is allowed to set the EnableUpdatePanelSupport flag on each SafeScriptManager control on your page. However, when there are multiple SafeScriptManager controls on a page, only one of them must set the EnableUpdatePanelSupport flag to true in order to enable the correct postback behavior for the whole page.