Setting SiteMapDataSource
Properties
The SiteMapDataSource
control includes several valuable properties that you can set to modify the nodes that the control returns:
• ShowStartingNode
—
Enables you to hide the starting node.
• StartFromCurrentNode
—
Enables you to return all nodes starting from the current node.
• StartingNodeOffset
—
Enables you to specify a positive or negative offset from the current node.
• StartingNodeUrl
—
Enables you to return all nodes, starting at a node associated with a specified URL.
The most useful of these properties is the ShowStartingNode
property. Normally, when you display a list of nodes with a Menu
or TreeView
control, you do not want to display the starting node (the link to the home page). The page in Listing ...
Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.