RadToolTipManager response error:
Exception=Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 0
And telerik dll version is 2010.1.309.35. Please help me..
Calender.ascx
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Calendar.ascx.cs" Inherits="Transactiv.Commerce.Web.Controls.Common.Calendar" %>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
function ShowToolTip(sender)
{
var tooltipManager = $find("<%=RadToolTipManager1.ClientID %>");
//If the user hovers the image before the page has loaded, there is no manager created
if (!tooltipManager) return;
setTimeout("", 3000);
//Find the tooltip for this element if it has been created
var tooltip = tooltipManager.getToolTipByElement(sender);
//Create a tooltip if no tooltip exists for such element
if (!tooltip)
{
tooltip = tooltipManager.createToolTip(sender);
var dateValue = sender.getAttribute("dateInfo");
//var neededValue = longValue.substring(longValue.indexOf('_') + 1)
tooltip.set_value(dateValue);
tooltip.show();
}
}
</script>
</telerik:RadCodeBlock>
<table>
<tr>
<td class="calender_txt">Calendar</td>
</tr>
<tr>
<td class="details_txt">
<telerik:RadCalendar ID="radScheduleCalendar" runat="server" TitleFormat="MMMM yyyy" Skin="Default"
OnDayRender="radScheduleCalendar_DayRender" Width="158px" AutoPostBack="true" >
</telerik:RadCalendar>
<telerik:RadToolTipManager Width="350px" Height="200px" RelativeTo="Element" ID="RadToolTipManager1" HideEvent="ManualClose" ShowEvent="OnClick"
runat="server" OffsetX="5" Position="MiddleRight" OnAjaxUpdate="RadToolTipmanager1_AjaxUpdate" Skin="Telerik" RenderInPageRoot="true" AnimationDuration="200">
</telerik:RadToolTipManager>
</td>
</tr>
</table>
Calender.ascx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Xml.Linq;
using Transactiv.Commerce.Web.Base;
namespace Transactiv.Commerce.Web.Controls.Common
{
public partial class Calendar : BaseUserControl
{
protected void Page_Load(object sender, EventArgs e)
{
radScheduleCalendar.CultureInfo = new System.Globalization.CultureInfo("en-us");
radScheduleCalendar.ShowRowHeaders = false;
radScheduleCalendar.UseColumnHeadersAsSelectors = false;
radScheduleCalendar.UseRowHeadersAsSelectors = false;
radScheduleCalendar.EnableMultiSelect = false;
radScheduleCalendar.SelectedDate = DateTime.Now;
radScheduleCalendar.EnableEmbeddedSkins = false;
}
protected void RadToolTipmanager1_AjaxUpdate(object sender, ToolTipUpdateEventArgs e)
{
//e.UpdatePanel.ContentTemplateContainer.Controls.Add(new LiteralControl("<html><body>"));
//e.UpdatePanel.ContentTemplateContainer.Controls.Add(new LiteralControl(e.Value));
//e.UpdatePanel.ContentTemplateContainer.Controls.Add(new LiteralControl("</body></html>"));
SchedulePanel details = (SchedulePanel)this.LoadControl("SchedulePanel.ascx");
details.Date = DateTime.Parse(e.Value);
e.UpdatePanel.ContentTemplateContainer.Controls.Add(details);
}
protected void radScheduleCalendar_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)
{
TableCell cell = e.Cell;
cell.Attributes.Add("dateInfo", e.Day.Date.ToString());
cell.Attributes.Add("onclick", "ShowToolTip(this);");
cell.CssClass = "Appointment";
e.Cell.Attributes["Title"] = "Click here for more information";
RadToolTipManager1.TargetControls.Add(cell.ClientID, true);
}
private int IsDayRegisteredForTooltip(DateTime date, DateTime eventDate)
{
int result;
if (DateTime.Compare(date, eventDate) == 0)
result = 1;
else
result = -1;
return result;
}
}
}