SPNavigationNode.Move Method
Moves the navigation node to the specified collection and to a position in the hierarchy following the specified (previousSibling) node.
Namespace: Microsoft.SharePoint.Navigation
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Sub Move ( _
collection As SPNavigationNodeCollection, _
previousSibling As SPNavigationNode _
)
'Usage
Dim instance As SPNavigationNode
Dim collection As SPNavigationNodeCollection
Dim previousSibling As SPNavigationNode
instance.Move(collection, previousSibling)
public void Move(
SPNavigationNodeCollection collection,
SPNavigationNode previousSibling
)
Parameters
collection
Type: Microsoft.SharePoint.Navigation.SPNavigationNodeCollectionThe navigation node collection (SPNavigationNodeCollection) to which the navigation node is moving.
previousSibling
Type: Microsoft.SharePoint.Navigation.SPNavigationNodeThe node (SPNavigationNode) in the new node collection that occupies a position in the hierarchy one before the position that the current node will have.
Exceptions
Exception | Condition |
---|---|
SPException | If the website inherits navigation. -or- The parent node of the collection is the top in the hierarchical navigation structure. |
Remarks
When moving nodes, the changes occur immediately. Calling the Update method is not necessary.