Telerik UI for ASP.NET AJAX

The RadToolTip exposes the server-side Title property, which can be used to set an overall title for the tooltip that is separate from the rest of the content. It is always displayed, regardless of the other content that is shown and the method that set it.

 



Content can be added to RadTooltip in multiple ways and is displayed in the below listed order of precedence. This means that if the first is not available the next one is tried until content is found.

  1. Setting the Text property:

  2. Content from the ToolTip property of the target control. It renders as the title property. Images supply the AlternateText and alt properties in ASP.NET and HTML respectively.

    Tip

    You can use the IgnoreAltAttribute to instruct the RadToolTip to ignore the AlternateText and alt properties and not remove them from its target element. This will result in a change of the content source priorities for images and a second tooltip being shown under IE6 and IE7, as these browsers interpret the alt attribute like the title attribute.

    The following code snippet will show the AlternateText as a content in the tooltip, despite the existence of markup in the tooltip itself. You can set the IgnoreAltAttribute to true and see how the behavior changes:

    CopyASPX
    <asp:Image runat="server" ID="Image1" AlternateText="the alternate text" Width="100px" Height="100px" />
    <telerik:RadToolTip runat="server" ID="RadToolTip1" TargetControlID="Image1" IsClientID="false"
        ShowEvent="OnMouseOver" HideEvent="Default" Position="BottomRight" RelativeTo="Mouse"
        Width="100px" Height="50px" Title="title">
        <asp:Label ID="Label1" Text="text within the tooltip declaration" runat="server" />
    </telerik:RadToolTip>
  3. Content from the controls collection has the lowest priority. The content is supplied from whatever is specified between the opening and closing tags of the tooltip or set in Controls collections in the codebehind.

     

    CopyASPX
    <telerik:RadToolTip ID="RadToolTip1" Skin="Inox" runat="server" TargetControlID="HyperLink1">
        Rich content:
        <asp:Button ID="btnA" runat="server" Text="Button in a ToolTip" />
    </telerik:RadToolTip>
Tip

You can also add large amounts of content dynamically using the RadToolTipManager OnAjaxUpdate event.

See Also