Tooltip on Masterpage

3 posts, 1 answers
  1. Kurt Kluth
    Kurt Kluth avatar
    144 posts
    Member since:
    Oct 2009

    Posted 03 Apr 2014 Link to this post

    Have a user control to simply contains a Tooltip that I would like loaded on my Master page.  Stepping through the code I can see it is loaded with data and if I hover over my icon it will show the tooltip however the tooltip only contains static text, not the loaded values. 

    Page_help.ascx
    <%@ Control Language="VB" AutoEventWireup="false" Inherits="FMS4.X.Common_Page_Help" Codebehind="Page_Help.ascx.vb" %>
     
    <telerik:RadToolTip runat="server" ID="RadToolTip1" Width="400px" ShowEvent="onmouseover"
                                            RelativeTo="Element" Animation="Resize" TargetControlID="HelpImg" IsClientID="false"
                                            HideEvent="ManualClose" Position="TopRight" Overlay="True" EnableDataCaching ="True">
        <table>
            <tr><td style="text-align: center;" class="Header1"><asp:Label ID="PageTitle" runat="server"></asp:Label></td></tr>
            <tr><td style="text-align: justify;"><asp:Label ID="PageDesc" runat="server" Text="Label"></asp:Label></td></tr>
            <tr><td> </td></tr>
            <tr><td style="text-align: center;" class="Header1">Page Help</td></tr>
            <tr><td style="text-align: justify;"><asp:Label ID="PageHelp" runat="server" Text="Label"></asp:Label></td></tr>
        </table>
    </telerik:RadToolTip>

    Master page

    <%@ Register Src="~/Common/Page_Help.ascx" TagName="PageHelp" TagPrefix="uc1" %>
     
    <div style="text-align:right; width: 98%; vertical-align: middle;">
         <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" />
              <uc1:PageHelp ID="PageHelp" runat="server" />
              <asp:Image ID="HelpImg" runat="server"  ImageUrl="~/images/help-icon.png" AlternateText="Page Help" />
    </div>

  2. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 04 Apr 2014 Link to this post

    Hi Kurt,

    The first and foremost task of RadToolTip is to replace browser tooltips. Thus, if its target has a title or alt attribute, they will take precedence over the content between its tags: http://www.telerik.com/help/aspnet-ajax/tooltip-content.html. Thus, you should remove the AlternateText of the asp:Image. When the tooltip initializes it will remove it from the markup anyway.

    I would also advise on setting expected dimensions for the control as explained in the first section here: http://www.telerik.com/help/aspnet-ajax/tooltip-troubleshooting-common-issues.html.

    On a side note - you do not need to set Overlay to true unless you have heavy weight objects that may hide the tooltip (PDFs, Silverlight, Flash) around the target.

    Also, the EnableDataCaching property is specific to the tooltip manager and will not have effect on a RadTooltip.


    Regards,

    Marin Bratanov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kurt Kluth
    Kurt Kluth avatar
    144 posts
    Member since:
    Oct 2009

    Posted 04 Apr 2014 in reply to Marin Bratanov Link to this post

    Thank you removing those items mentioned worked just great.
Back to Top