SiteMap allows you to add ToolTips to each node.
You can select any node and set the ToolTip property for every node.
Set the ToolTip property within the <cc1:C1SiteMap>
tag, to add a ToolTip to the entire control, as shown below:
Copy Code
|
|
---|---|
<cc1:C1SiteMap ID="C1SiteMap1" runat="server" ToolTip="This is a SiteMap Control" ShowNodeLines="true" DataSourceID="C1SiteMapDataSource1"> |
Set the ToolTip property in the <cc1:C1SiteMapNode>
tag, to add ToolTip to a single node, as shown below:
Copy Code
|
|
---|---|
<cc1:C1SiteMapNode runat="server" Text="C1SiteMapNode1" ToolTip="This is a Node Tooltip"> |
Add the following code to the Page_Load event, to add a ToolTip to the entire control.
To write code in C#
C1.SiteMap1.ToolTip = "SiteMap Control";
To write code in Visual Basic
C1.SiteMap1.ToolTip = "SiteMap Control"
Add the following code to the Page_Load event, to add a ToolTip to individual nodes.
To write code in C#
C1SiteMap1.Nodes[0].ToolTip = "Parent1"; C1SiteMap1.Nodes[0].Nodes[0].ToolTip = "child1"; C1SiteMap1.Nodes[1].ToolTip = "parent2";
To write code in Visual Basic
C1SiteMap1.Nodes(0).ToolTip = "Parent1" C1SiteMap1.Nodes(0).Nodes(0).ToolTip = "child1" C1SiteMap1.Nodes(1).ToolTip = "parent2"
When you run the project, hover the mouse over SiteMap nodes. Notice that a tooltip appears on the node.