Assembly: System.Web (in System.Web.dll)
A object represents a Web site page in a site map structure. objects are loaded by the static SiteMap class at run time using one or more site map providers to load site map data from persistent storage into memory. objects are wrapped by the SiteMapNodeItem class for use by Web server controls, such as the SiteMapPath control.
The class includes several properties that are used to describe a single page in a Web site, including properties that describe a page, such as the Url, Title, and Description properties. Whereas the Url property is used by the XmlSiteMapProvider class, which is the default site map provider for ASP.NET, as a lookup key in the internal collections that the provider uses to track nodes, the class supports a basic Key property that can be used by site map providers to track nodes. Additionally, the Url property is used by navigation controls to render hyperlinks to pages within a navigation structure. The Title property is a friendly name for the , is often the same as the HTML title of a Web Form, and is used by navigation controls to render simple labels. Finally, a NameValueCollection collection of additional Attributes attributes is available to site map providers that use objects, but require additional properties that are not available in the base class.
This section contains two code examples. The first code example demonstrates how to create a new site map node collection and add elements to it. The second code example demonstrates how to load site map data from a text file.
The following code example demonstrates how the SimpleTextSiteMapProvider parses a text file that contains site map data in comma-delimited strings. A new object is added to the internal tracking collections of the class for each line that is read from the file.
This code example is part of a larger example provided for the SiteMapProvider class.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.