NavigationNodeCollection.Add Method

Creates a navigation node object and adds it to the collection.

Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)


<RemoteAttribute> _
Public Function Add ( _
    parameters As NavigationNodeCreationInformation _
) As NavigationNode
Dim instance As NavigationNodeCollection
Dim parameters As NavigationNodeCreationInformation
Dim returnValue As NavigationNode

returnValue = instance.Add(parameters)
public NavigationNode Add(
    NavigationNodeCreationInformation parameters


Return Value

Type: Microsoft.SharePoint.Client.NavigationNode
Returns a NavigationNode instance representing the creation of a navigation node object and adds it to the collection.


This code example adds a node to the Quick Launch area of the specified site and displays the current Quick Launch nodes.

using System;
using Microsoft.SharePoint.Client;

namespace Microsoft.SDK.SharePointFoundation.Samples
    class NavigationNodeCollection_AddExample
        static void Main()
            string siteUrl = "http://MyServer/sites/MySiteCollection";

            ClientContext clientContext = new ClientContext(siteUrl);
            Web site = clientContext.Web;

            // Get the Quick Launch navigation node collection.
            NavigationNodeCollection collQuickLaunchNode = site.Navigation.QuickLaunch;

            // Set properties for a new navigation node.
            NavigationNodeCreationInformation ciNavicationNode = new NavigationNodeCreationInformation();
            ciNavicationNode.Title = "New Node";
            ciNavicationNode.Url = "https://localhost";
            // Create node as the last node in the collection.
            ciNavicationNode.AsLastNode = true;


            Console.WriteLine("Current nodes:\n");
            foreach (NavigationNode navNode in collQuickLaunchNode)

See Also


NavigationNodeCollection Class

NavigationNodeCollection Members

Microsoft.SharePoint.Client Namespace