System.Web 2.0.0.0 System.Object

Site maps are used in conjunction with the , , and other controls to render an effective navigation interface for users to navigate a Web site. A object is a component of the ASP.NET site navigation infrastructure that provides access to read-only site map information for page and control developers using navigation and controls. Other components of the ASP.NET site navigation infrastructure include the and classes, the Web.sitemap file, and the various controls that work with the class, such as the control, to render content and menus.

The has several functions:

It provides the root node of the site navigation hierarchy (there can be only one root node).

It identifies which site map provider is the principal, or default, provider.

It keeps track of all the provider objects that are used to create the .

Fundamentally, the is a container for a hierarchical collection of objects. However, the does not maintain the relationships between the nodes; rather, it delegates this to the site map providers. The acts as an interface to the site navigation information (in the form of objects) that is held by these site map providers. It keeps track of the providers from which it can access site navigation data and exposes its collection. A provider can store its site map information in any way—as long as it extends the abstract class, the class can be initialized successfully from it.

The default provider for the class is the class, which works with an XML configuration file, Web.sitemap. However, you can write your own object, and use it to initialize the site map for your site. For an example of a custom site map provider, see .

A default site map configuration is specified that manages the site navigation configuration. You can override this configuration in the Web.config file, should you choose to write your own site map provider.

The class offers only static members for performance and it can be accessed at any time in a given site from a Web Form or Web server control.

The class is an in-memory representation of the navigation structure for a site, which is provided by one or more site map providers. This class cannot be inherited.

- Property
  System.Web.SiteMapNode To be added.

  The class retrieves the property by requesting it from the provider.

  If no representative node exists for the page in the site map information, or if security trimming is enabled and the node cannot be returned for the current user, null is returned.

  The event is raised by the default site map provider if one or more subscriptions exist.

  If you implement your own object, you might create your own mechanism to find and retrieve the . However, if you extend the class and use a URL-based scheme to identify pages, you can override the method.

  Gets a control that represents the currently requested page.

  2.0.0.0
- Property
  System.Boolean To be added.

  A default site map configuration is specified that manages the site navigation configuration. You can override this configuration in the Web.config file, should you choose to write your own site map provider.

  Gets a Boolean value indicating if a site map provider is specified in the Web.config file and if the site map provider is enabled.

  2.0.0.0
- Property
  System.Web.SiteMapProvider To be added.

  By default, the object is used and site navigation data is loaded from the Web.sitemap file that is located in the root directory of the site. This is identified in the management classes that manage the site navigation configuration and the site map configuration section of the Web.config files. By default, it is an instance of the class, which uses the Web.sitemap file as its persistent store. However, you can implement your own site map storage and configuration scheme by writing a class that implements the abstract class. For more information on writing your own provider, see .

  Gets the default object for the current site map.

  2.0.0.0
- Property
  System.Web.SiteMapProviderCollection To be added.

  The site map providers that are listed in the collection are those that are specified in the configuration hierarchy to initialize the class. Only the default provider (identified by the property) is guaranteed to be used by the during initialization; the presence of a provider in the collection means that it was specified in the configuration and was available during initialization.

  Gets a read-only collection of named objects that are available to the class.

  2.0.0.0
- Property
  System.Web.SiteMapNode To be added.

  The class retrieves the property by requesting it from the provider. If there is a provider hierarchy, the class retrieves the root node of the root provider in the hierarchy. To access the root node of the default provider, call the property, which retrieves both the default provider and its property.

  The object, which is the default provider for the class, supports only one .

  If you implement your own class and override the abstract property, you must provide your own implementation to track the property of the instance.

  The root node must be visible to all users, by design. If the root node is not visible to all users when security trimming is enabled, accessing the property might result in an exception.

  Gets a object that represents the top-level page of the navigation structure for the site.

  2.0.0.0
- Event
  System.Web.SiteMapResolveEventHandler

  Subscribers attach a object to the static event to receive notification when the property is accessed. This enables the user to implement custom logic when creating a representation of the currently executing page without requiring a custom provider implementation.

  If you subscribe to the event, you also subscribe to the event on the default site map provider.

  Occurs when the property is accessed.

  2.0.0.0