Share via


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

  • name
    Type: System.String

    The new name or title of the SPNavigationNode.

  • description
    Type: System.String

    The new description of the SPNavigationNode.

  • target
    Type: System.String

    The 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.String

    The new audience to display this SPNavigationNode to.

  • forceCreate
    Type: System.Boolean

    Whether 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.

See Also

Reference

SPNavigationSiteMapNode Class

SPNavigationSiteMapNode Members

Microsoft.SharePoint.Publishing.Navigation Namespace