Adds an array of System.Web.SiteMapProvider objects into the provider collection using the System.Configuration.Provider.ProviderBase.Name properties as keys.
- providerArray
- The array of System.Web.SiteMapProvider objects to add.
The System.Web.SiteMapProviderCollection that is returned by the SiteMap.Providers property is read-only. For this reason, you cannot use the erload:System.Web.SiteMapProviderCollection.Add and SiteMapProviderCollection.AddArray(SiteMapProvider[]) methods to add additional providers programmatically at run time. Therefore, the erload:System.Web.SiteMapProviderCollection.Add and SiteMapProviderCollection.AddArray(SiteMapProvider[]) methods are only used in scenarios where you manually create site map provider objects and manage them with an instance of the System.Web.SiteMapProviderCollection class.
Because the System.Web.SiteMap class is static, any System.Web.SiteMapProvider contained in its SiteMap.Providers collection remains for the lifetime of the Web application.