SiteMapProviderCollection.AddArray Method

Adds an array of SiteMapProvider objects into the provider collection using the Name properties as keys.

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

public void AddArray (
	SiteMapProvider[] providerArray
)
public void AddArray (
	SiteMapProvider[] providerArray
)
public function AddArray (
	providerArray : SiteMapProvider[]
)
Not applicable.

Parameters

providerArray

The array of SiteMapProvider objects to add.

Exception typeCondition

ArgumentException

A SiteMapProvider with the same name already exists in the SiteMapProviderCollection.

ArgumentNullException

providerArray is a null reference (Nothing in Visual Basic).

NotSupportedException

The SiteMapProviderCollection is read-only.

The SiteMapProviderCollection that is returned by the Providers property is read-only. For this reason, you cannot use the Add and AddArray methods to add additional providers programmatically at run time. Therefore, the Add and AddArray methods are only used in scenarios where you manually create site map provider objects and manage them with an instance of the SiteMapProviderCollection class.

Because the SiteMap class is static, any SiteMapProvider contained in its Providers collection remains for the lifetime of the Web application.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: