SPNavigationSiteMapNode.UpdateSPNavigationNode Method
Updates an given SPNavigationNode with the specified name or title, URL, description, target, and audience,] and moves the node after the given previous SPNavigationNode.
Namespace: Microsoft.SharePoint.Publishing.Navigation
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
Public Shared Function UpdateSPNavigationNode ( _
node As SPNavigationNode, _
previous As SPNavigationNode, _
name As String, _
url As String, _
description As String, _
target As String, _
audience As String, _
forceCreate As Boolean _
) As SPNavigationNode
'Usage
Dim node As SPNavigationNode
Dim previous As SPNavigationNode
Dim name As String
Dim url As String
Dim description As String
Dim target As String
Dim audience As String
Dim forceCreate As Boolean
Dim returnValue As SPNavigationNode
returnValue = SPNavigationSiteMapNode.UpdateSPNavigationNode(node, _
previous, name, url, description, _
target, audience, forceCreate)
public static SPNavigationNode UpdateSPNavigationNode(
SPNavigationNode node,
SPNavigationNode previous,
string name,
string url,
string description,
string target,
string audience,
bool forceCreate
)
Parameters
node
Type: Microsoft.SharePoint.Navigation.SPNavigationNodeThe SPNavigationNode to update.
previous
Type: Microsoft.SharePoint.Navigation.SPNavigationNodeThe SPNavigationNode after which to move the "node" SPNavigationNode.
name
Type: System.StringThe new name or title of the SPNavigationNode.
url
Type: System.StringThe new URL of the SPNavigationNode.
description
Type: System.StringThe new description of the SPNavigationNode.
target
Type: System.StringThe new value of the target property. This is used as the value for the _target property on the link rendered to represent this SPNavigationNode.
audience
Type: System.StringThe new audience to display this SPNavigationNode to.
forceCreate
Type: System.BooleanWhether to force the node to be re-created rather than just updated.
Return Value
Type: Microsoft.SharePoint.Navigation.SPNavigationNode
The updated, or potentially new, SPNavigationNode.
Remarks
If the URL of the node is being changed the node will always be re-created.