Hi Raj,
we found one way of re-registering custom client event handlers of calendar events after update panel reloading. The initial solution was found at: http://weblogs.asp.net/infinitiesloop/archive/2007/09/17/inline-script-inside-an-asp-net-ajax-updatepanel.aspx
For Outlook calendar skin you can do the following steps:
1) Add the following code at the end of "OutlookCalendar.ascx.cs" file in WebSample calendar project
namespace WebSample
{
public class InlineScript : Control
{
protected override void Render(HtmlTextWriter writer)
{
ScriptManager sm = ScriptManager.GetCurrent(Page);
if (sm.IsInAsyncPostBack)
{
StringBuilder sb = new StringBuilder();
base.Render(new HtmlTextWriter(new StringWriter(sb)));
string script = sb.ToString();
ScriptManager.RegisterStartupScript(this, typeof(InlineScript), UniqueID, script, false);
}
else
{
base.Render(writer);
}
}
}
}
2) Place Outlook skinned calendar into ContentTemplate of update panel.
3) Register WebSample namespace at the beginning of "OutlookCalendar.ascx" file:
<%@ Register Assembly="WebSample" TagPrefix="ws" Namespace="WebSample" %>
4) Place the following tag into ContentTemplate of update panel after calendar tag:
<ws:InlineScript runat="server">
</ws:InlineScript>
5) Move all java-script from the end of "OutlookCalendar.ascx" file into this tag.
6) Add triggers to update panel:
<Triggers>
<asp:AsyncPostBackTrigger ControlID="lbDayView" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="lbWeekView" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="lbWorkWeekView" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="lbMonthView" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="lbYearView" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="lbTaskView" EventName="Click" />
</Triggers>
Now in Outlook skinned calendar custom client event handlers are re-registered after update panel reloading. But you should care about highlighting link buttons with view names after calendar view is changed in update panel.
When we used this way in "GoogleCalendar.ascx" file custom client event handlers were also re-registered successfully, but light pop-up editor (it is described in "GoogleEditor.js" file in web sample) did not behave correctly. So it needs to be modified for working with update panel.
Hope this helps.