This is a migrated thread and some comments may be shown as answers.

Tooltip Manager - RequestManagerServerException after Session Timeout

2 Answers 100 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Gabriele
Top achievements
Rank 1
Gabriele asked on 22 Oct 2013, 03:22 PM
Hi *,

I have a Webpage that contains a RadOrgChart and RadToolTip-Manager. The Content of the ToolTip is based on the ID given from the RadOrgChart. It works fine until... the session times out.

The Response as soon as the Session times out is:
RadToolTipManager response error: Exception=Sys.WebForms.PageRequestManagerServerErrorException: Value cannot be null. Parameter name: source

I've already added an check that the control should not load then the Value is null.

public void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs e)
{
    if (e.Value != null)
    {
        Control ctrl = Page.LoadControl("OrgChartUserDetail.ascx");
        ctrl.ID = Guid.NewGuid().ToString();
 
        e.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl);
        OrgChartUserDetail details = (OrgChartUserDetail)ctrl;
        details.ID = e.Value;
    }
}
 
void orgUserOrgChart_GroupItemDataBound(object sender, Telerik.Web.UI.OrgChartGroupItemDataBoundEventArguments e)
{
    var panel = (Panel)e.Item.FindControl("Panel1");
    RadToolTipManager2.TargetControls.Add(panel.ClientID, e.Item.ID, true);
}

<telerik:RadOrgChart ID="orgUserOrgChart" runat="server" ClientIDMode="Static" OnNodeDataBound="orgUserOrgChart_NodeDataBound" GroupColumnCount="2" Skin="Silk">
<ItemTemplate>
      <asp:Panel runat="server" ID="Panel1">
           <span class="pseudoImage" style="background-image: url('<%# DataBinder.Eval(Container.DataItem, "PictureString") %>')"></span>
               <a href="<%# String.Format("mailto:{0}", DataBinder.Eval(Container.DataItem, "eMail"), "", "")%>" class="tooltipLinks">
            <img src="images/mail.png" width="25px" alt="Send Email"></a>
        </asp:Panel>
      </ItemTemplate>
      <RenderedFields>
            <NodeFields>
                   <telerik:OrgChartRenderedField DataField="Description" Label="" />
               </NodeFields>
       </RenderedFields>
</telerik:RadOrgChart>
 
 
<telerik:RadToolTipManager runat="server" ID="RadToolTipManager2" Skin="Default" OnAjaxUpdate="OnAjaxUpdate"
          Position="BottomRight" OffsetX="16" OffsetY="16" EnableShadow="false" Width="195" Height="135" HideEvent="LeaveTargetAndToolTip" />

There are no MS AJAX update panels on the side - I use the RadAjaxManager instead. The GroupItemDataBound-Event is added in the Page_Load and the UserControl loads the Content based on the ID (it loads nothing if no ID is available).
It is no big deal if the Session times out and the ToolTip-Content is not correctly loaded but I need to get rid of the error message and somehow I can't manage that.

Any help would be appreciated. I don't want to hack a 'Session-Keep-alive' or something.

Regards,
Gaby

2 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 23 Oct 2013, 10:37 AM
Hi Gaby,

You may find useful the following code library entry on checking for user login status: http://www.telerik.com/community/code-library/aspnet-ajax/tooltip/handling-the-ajaxupdate-event-of-radtooltipmanager-after-the-session-has-expired-when-using-forms-authentication.aspx/. It explains why you receive an error and how it stems from the way MS AJAX works (RadToolTipManager's AjaxUpdate uses an UpdatePanel to initiate the partial postback that lets you load controls in it).

If you do not care about the problem itself, you can prevent the alert with the error via the OnClientResponseError event of the RadToolTIpManager - the event arguments offer the set_cancelErrorAlert(bool) method that can prevent it, when true is passed: http://www.telerik.com/help/aspnet-ajax/tooltipmanager-client-side-on-response-error.html.

Regards,
Marin Bratanov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Gabriele
Top achievements
Rank 1
answered on 23 Oct 2013, 10:47 AM
Hi,

thank you for the reply. I've already checked the first link before opening that topic.I don't require a user login but I'll check it out again.

And I defintily take a look at the second part - that might really do the trick.

Thank you again.

Gaby
Tags
ToolTip
Asked by
Gabriele
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Gabriele
Top achievements
Rank 1
Share this question
or