SPContentMapProvider.GetParentNode Method
Retrieves the parent node of a specified SiteMapNode object.
Namespace: Microsoft.SharePoint.Navigation
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Overrides Function GetParentNode ( _
node As SiteMapNode _
) As SiteMapNode
'Usage
Dim instance As SPContentMapProvider
Dim node As SiteMapNode
Dim returnValue As SiteMapNode
returnValue = instance.GetParentNode(node)
public override SiteMapNode GetParentNode(
SiteMapNode node
)
Parameters
node
Type: System.Web.SiteMapNodeThe SiteMapNode instance for which to retrieve the parent node.
Return Value
Type: System.Web.SiteMapNode
Returns a SiteMapNode instance that represents the parent of node; returns a null reference if the object has no parent or if security trimming is enabled and the parent node is not accessible to the current user.
Remarks
The SecurityTrimmingEnabled property has no effect on the behavior of SPContentMapProvider, because having access to the current item, folder, or list implies that you have access to the parent, cascading up to the level of the containing SPWeb object.
When UseShared is set to True, SPContentMapProvider bridge to the SPSiteMapProvider object when it reaches the containing SPWeb object. SPSiteMapProvider then returns parent nodes until it reaches a SPWeb object that has its UseShared property set to False.