donderdag 29 januari 2009

Workaround : Ajax and publishing pages.

When you have configured SharePoint for use with AJAX you will see , when you deploy an AJAX web part and put this on a pages, that when running this page the web part will fire the events but not will render de web part.

The work around for this “bug” is to move the
<WebPartPages:SPWebPartManager ID="SPWebPartManager1" runat="server"/> just below the
scriptmanager tag in side the form tag.

Original:
<WebPartPages:SPWebPartManager ID="SPWebPartManager1" runat="server"/>
<form runat="server" onsubmit="return _spFormOnSubmitWrapper();">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

Change it to:

<form runat="server" onsubmit="return _spFormOnSubmitWrapper();">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<WebPartPages:SPWebPartManager ID="SPWebPartManager1" runat="server"/>

Then you will se the web part will be rendered after fire ring an event.

Geen opmerkingen: