XmlSiteMapProvider.AddProvider(String, SiteMapNode) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Links a child site map provider to the current provider.
protected:
virtual void AddProvider(System::String ^ providerName, System::Web::SiteMapNode ^ parentNode);
protected virtual void AddProvider (string providerName, System.Web.SiteMapNode parentNode);
abstract member AddProvider : string * System.Web.SiteMapNode -> unit
override this.AddProvider : string * System.Web.SiteMapNode -> unit
Protected Overridable Sub AddProvider (providerName As String, parentNode As SiteMapNode)
Parameters
- providerName
- String
The name of one of the SiteMapProvider objects currently registered in the Providers.
- parentNode
- SiteMapNode
A site map node of the current site map provider under which the root node and all nodes of the child provider is added.
Exceptions
The Provider property of the parentNode
does not reference the current provider.
parentNode
is null
.
providerName
cannot be resolved.
The site map file used by providerName
is already in use within the provider hierarchy.
-or-
The root node returned by providerName
is null
.
-or-
The root node returned by providerName
has a URL or key that is already registered with the parent XmlSiteMapProvider.
Remarks
The AddProvider method links providerName
to the current provider as a child of the current provider. The root node of providerName
is added to the hierarchy for the current provider as a child node of parentNode
. Because the parent provider calls the BuildSiteMap method on providerName
, the exceptions that are described in the BuildSiteMap method might be thrown.
Applies to
See also
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈