SPNavigation.TopNavigationBar Property

Gets an Microsoft.SharePoint.Navigation.SPNavigationNodeCollection object that contains the nodes that correspond with links in the top navigation bar of the site.

Namespace:  Microsoft.SharePoint.Navigation
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

Public ReadOnly Property TopNavigationBar As SPNavigationNodeCollection
    Get

Dim instance As SPNavigation
Dim value As SPNavigationNodeCollection

value = instance.TopNavigationBar
public SPNavigationNodeCollection TopNavigationBar { get; }

Property Value

Type: Microsoft.SharePoint.Navigation.SPNavigationNodeCollection
Returns an Microsoft.SharePoint.Navigation.SPNavigationNodeCollection object. Returns a null reference (Nothing in Visual Basic) if the top navigation area is defined in a different site, or if the top navigation bar node collection has been deleted.

Remarks

An exception is thrown if the user tries to set the node collection for a Web site that inherits navigation.

Setting a node collection takes effect immediately, and no call to the Update method is required.

See Also

Reference

SPNavigation Class

SPNavigation Members

Microsoft.SharePoint.Navigation Namespace

Microsoft.SharePoint.Navigation.SPNavigationNodeCollection

Microsoft.SharePoint.Navigation.SPNavigationNode