请单击以进行评分并提供反馈
MSDN
MSDN Library
.NET 开发
.NET Framework
 SiteMap 属性
全部折叠/全部展开 全部折叠
此页面仅适用于
Microsoft Visual Studio 2008/.NET Framework 3.5

同时提供下列产品的其他版本:
.NET Framework 类库
SystemWebSectionGroup..::.SiteMap 属性

更新:2007 年 11 月

获取 siteMap 节。

命名空间:  System.Web.Configuration
程序集:  System.Web(在 System.Web.dll 中)

Visual Basic(声明)
<ConfigurationPropertyAttribute("siteMap")> _
Public ReadOnly Property SiteMap As SiteMapSection
Visual Basic (用法)
Dim instance As SystemWebSectionGroup
Dim value As SiteMapSection

value = instance.SiteMap
C#
[ConfigurationPropertyAttribute("siteMap")]
public SiteMapSection SiteMap { get; }
Visual C++
[ConfigurationPropertyAttribute(L"siteMap")]
public:
property SiteMapSection^ SiteMap {
    SiteMapSection^ get ();
}
J#
/** @property */
/** @attribute ConfigurationPropertyAttribute("siteMap") */
public SiteMapSection get_SiteMap()
JScript
public function get SiteMap () : SiteMapSection

SiteMapSection 对象引用配置文件的 siteMap 节。

TopicLocation
如何:以编程方式枚举站点地图节点生成 ASP .NET Web 应用程序
如何:以编程方式枚举站点地图节点在 Visual Studio 中生成 ASP .NET Web 应用程序
如何:在不分层的 Web 服务器控件中显示站点地图数据生成 ASP .NET Web 应用程序
如何:在非分层 Web 服务器控件中显示站点地图数据在 Visual Studio 中生成 ASP .NET Web 应用程序
如何:实现 ASP.NET 站点地图提供程序生成 ASP .NET Web 应用程序
如何:实现 ASP.NET 站点地图提供程序在 Visual Studio 中生成 ASP .NET Web 应用程序
如何:添加简单的站点导航生成 ASP .NET Web 应用程序
如何:添加简单的站点导航在 Visual Studio 中生成 ASP .NET Web 应用程序
如何:筛选 SiteMapDataSource Web 服务器控件检索到的节点生成 ASP .NET Web 应用程序
如何:筛选 SiteMapDataSource Web 服务器控件检索到的节点在 Visual Studio 中生成 ASP .NET Web 应用程序
如何:配置多个站点地图和站点地图提供程序生成 ASP .NET Web 应用程序
如何:配置多个站点地图和站点地图提供程序在 Visual Studio 中生成 ASP .NET Web 应用程序

下面的代码示例演示如何从现有 Web 应用程序的配置文件获取 SiteMapSection 对象。

Visual Basic
' Get the siteMap section.
Dim siteMap As SiteMapSection = _
systemWeb.SiteMap
' Read section information.
info = siteMap.SectionInformation
name = info.SectionName
type = info.Type
declared = info.IsDeclared.ToString()
msg = String.Format("Name:     {0}" + _
ControlChars.Lf + "Declared: {1}" + _
ControlChars.Lf + "Type:     {2}" + _
ControlChars.Lf, name, declared, type)

C#
// Get the siteMap section.
SiteMapSection siteMap =
    systemWeb.SiteMap;
// Read section information.
info =
    siteMap.SectionInformation;
name = info.SectionName;
type = info.Type;
declared = info.IsDeclared.ToString();
msg = String.Format(
    "Name:     {0}\nDeclared: {1}\nType:     {2}\n",
    name, declared, type);

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

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

.NET Framework

受以下版本支持:3.5、3.0、2.0
社区内容   什么是社区内容?
添加新内容 RSS  批注
Processing
© 2009 Microsoft Corporation 版权所有。 保留所有权利 | 商标 | 隐私权声明
Page view tracker