SiteMapPath.SiteMapProvider 属性

定义

获取或设置用于呈现站点导航控件的 SiteMapProvider 的名称。Gets or sets the name of the SiteMapProvider used to render the site navigation control.

public:
 virtual property System::String ^ SiteMapProvider { System::String ^ get(); void set(System::String ^ value); };
[System.Web.UI.Themeable(false)]
public virtual string SiteMapProvider { get; set; }
member this.SiteMapProvider : string with get, set
Public Overridable Property SiteMapProvider As String

属性值

String

SiteMapProvider 的名称,它定义要显示的 SiteMapPath 的导航结构。The name of a SiteMapProvider that defines the navigation structure for the SiteMapPath to display. 所有可用提供程序都包含在 Providers 集合中,都可使用 Item[String] 属性按名称进行枚举和检索。All available providers are contained in the Providers collection, and can be enumerated and retrieved by name using the Item[String] property.

属性

注解

SiteMapPath 控件使用 SiteMapProvider 作为其呈现的站点地图数据的源。The SiteMapPath control uses a SiteMapProvider as a source for the site map data it renders. 如果未设置 SiteMapProvider 属性,则 SiteMapPath 控件将使用 SiteMap.Provider 属性标识的提供程序,这是为配置层次结构中的站点定义的默认 SiteMapProvider,通常为 XmlSiteMapProviderIf the SiteMapProvider property is not set, the SiteMapPath control uses the provider identified by the SiteMap.Provider property, which is the default SiteMapProvider defined for the site in the configuration hierarchy, typically the XmlSiteMapProvider. 设置 SiteMapProvider 属性将指示 SiteMapPath 控件呈现提供程序所定义的站点地图数据。Setting the SiteMapProvider property directs the SiteMapPath control to render the site map data that the provider defines.

SiteMapPath 控件可直接处理 SiteMapProvider 及其 SiteMapNode 对象,以显示站点地图信息。The SiteMapPath control works directly with a SiteMapProvider and its SiteMapNode objects to display site map information. 其他控件(如 MenuTreeView)需要由 SiteMapDataSource 类提供的数据抽象来显示相同的站点导航信息。Other controls, such as Menu and TreeView, require a data abstraction, provided by the SiteMapDataSource class, to display the same site navigation information.

此属性的值存储在视图状态中。The value of this property is stored in view state.

无法通过主题或样式表主题设置此属性。This property cannot be set by themes or style sheet themes. 有关详细信息,请参阅 ThemeableAttributeASP.NET 主题和外观For more information, see ThemeableAttribute and ASP.NET Themes and Skins.

适用于

另请参阅