SiteMapNodeCollection.Add Method
Assembly: System.Web (in system.web.dll)
public int Add ( SiteMapNode value )
public function Add ( value : SiteMapNode ) : int
Parameters
- value
The SiteMapNode to add to the SiteMapNodeCollection.
Return Value
The index of the InnerList where the SiteMapNode was inserted.You cannot add a SiteMapNode object to a read-only or fixed-size SiteMapNodeCollection collection. You can test whether a SiteMapNodeCollection is read-only by checking the IsReadOnly property.
This section contains two code examples. The first code example demonstrates how to create a new SiteMapNodeCollection collection and add elements to it. The second code example demonstrates how to add elements to a custom site map provider.
The following code example demonstrates how to use the SiteMapNodeCollection constructor to create a new SiteMapNodeCollection, and then add elements to it with the Add method.
The following code example demonstrates a custom site map provider implementation and shows how to use the SiteMapNodeCollection constructor to create a new SiteMapNodeCollection and add elements to the SiteMapNodeCollection with the Add method.
This code example is part of a larger code example provided for the SiteMapProvider class.
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.