System.Web.UI.WebControls.SiteMapDataSource.StartingNodeOffset Property

Gets or sets a positive or negative integer offset from the starting node that determines the root hierarchy that is exposed by the data source control.

Syntax

[System.ComponentModel.DefaultValue(0)]
public virtual int StartingNodeOffset { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

If the SiteMapDataSource.StartingNodeOffset property is set to a value other than 0, it affects the starting node and with it the site map data hierarchy that is exposed by the System.Web.UI.WebControls.SiteMapDataSource control. The negative or positive integer value of the SiteMapDataSource.StartingNodeOffset identifies the number of levels up or down the site map hierarchy from the starting node that is identified by the SiteMapDataSource.StartFromCurrentNode and SiteMapDataSource.StartingNodeUrl properties to offset the starting node of the subtree that is exposed by data source control.

If the identified starting node is the node that represents the currently requested page, the SiteMapDataSource.StartingNodeOffset is ignored.

If the SiteMapDataSource.StartingNodeOffset property is set to a negative number -n, the starting node of the subtree that is exposed by the data source control is the ancestor node n hierarchical levels above the identified starting node. If the value n is greater than the number of ancestor levels in the hierarchical tree, the starting node of the subtree is the root node of the site map hierarchy.

If the SiteMapDataSource.StartingNodeOffset property is set to a positive number +n, the starting node of the subtree that is exposed is a child node n levels below the identified starting node. Because more than one branch of child nodes might exist in the hierarchy, the System.Web.UI.WebControls.SiteMapDataSource attempts to resolve a child node directly on the path between the identified starting node and the node that represents the currently requested page, if possible. If the node that represents the currently requested page is not in the subtree of the identified starting node, the value of the SiteMapDataSource.StartingNodeOffset property is ignored. If the node that represents the currently requested page is less than n levels below the identified starting node, the currently requested page node is used as the starting node.

The value of the SiteMapDataSource.StartingNodeOffset property is stored in view state.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0