Showing posts with label Update Panel in Publishing Site template. Show all posts
Showing posts with label Update Panel in Publishing Site template. Show all posts

Monday, 16 March 2009

Update Panel in Publishing Site Template

Lately i was trying my hands on Ajax based webpart on Publishing Site and faced problem withUpdatePanel . Page does a partial Postback but controls are not rendered properly .Example Scenario :
UpdatePanel
____________button
______________Label

button have event to update label .. .. now in this case button event happens but label text doesnt get updated . This only happens in Publishing Site Template and works fine in other site templates .How to Solve :

Open Masterpage and replace following

"
<body class="body" onload="javascript:_spBodyOnLoadWrapper();">
<WebPartPages:SPWebPartManager runat="server"/>
<form runat="server" onsubmit="return _spFormOnSubmitWrapper();">
"

with

"
<BODY scroll="yes" class="rly-body" onload="javascript:if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();">
<form runat="server" onsubmit="return _spFormOnSubmitWrapper();">

<WebPartPages:SPWebPartManager ID="SPWebPartManager1" runat="server"/>
"

Hopefully this will make it work
Enjoy !!