SPXmlContentMapProvider.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 SPXmlContentMapProvider
Dim node As SiteMapNode
Dim returnValue As SiteMapNode
returnValue = instance.GetParentNode(node)
public override SiteMapNode GetParentNode(
SiteMapNode node
)
Parameters
node
Type: System.Web.SiteMapNodeSiteMapNode object for which to retrieve the parent node.
Return Value
Type: System.Web.SiteMapNode
A SiteMapNode object that represents the parent of node.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | SiteMapNode parameter is a null reference (Nothing in Visual Basic). |
Remarks
If the parent of the node that is provided is the root node "/", the SPContentMapProvider class is used to provide the parent node, and any further parent nodes.
The current context of the parent node or content map provider also provides information used in initialization. When the requiredParameters attribute is present on a node in the sitemap file, the information returned by this method will include any url parameters from requiredParameters that appear in the request url.
Sitemap node filtering by the sitemap provider, based on a user's role, has no effect. If the current node can be accessed, its parent node can also be accessed, up to and including the SPWeb object.
See Also
Reference
SPXmlContentMapProvider Members