You can add keyboard shortcuts to the SiteMap control by changing the AccessKey property.
Complete the following steps to add keyboard support in Design View.
Set the AccessKey property inside the <cc1:C1SiteMap>
tag, to add a keyboard shortcut to the SiteMap control.
Copy Code
|
|
---|---|
<cc1:C1SiteMap ID="C1SiteMap1" runat="server" AccessKey="K"> |
Set the AccessKey property inside the <cc1:C1SiteMapNode>
tag, to add keyboard shortcut to a C1SiteMapNode.
Copy Code
|
|
---|---|
<cc1:C1SiteMapNode runat="server" Text="C1SiteMapNode1" AccessKey="N"> |
Add the following code to the Page_Load event, to add a keyboard shortcut to the entire control.
To write code in C#
C1.SiteMap1.AccessKey= "k";
To write code in Visual Basic
C1.SiteMap1.AccessKey= "k"
Add the following code to the Page_Load event, to add a keyboard shortcut to individual nodes.
To write code in C#
C1SiteMap1.Nodes[0].AccessKey= "a"; C1SiteMap1.Nodes[0].Nodes[0].AccessKey= "b"; C1SiteMap1.Nodes[1].AccessKey= "c";
To write code in Visual Basic
C1SiteMap1.Nodes(0).AccessKey= "a" C1SiteMap1.Nodes(0).Nodes(0).AccessKey= "b" C1SiteMap1.Nodes(1).AccessKey= "c"
When you run your project, press ALT + K (AccessKey) to highlight the SiteMap control. Else press Alt + AccessKey for the node, to highlight a particular node.