This documentation is archived and is not being maintained.

SiteMapDataSourceView Class

Provides a strongly typed HierarchicalDataSourceView object for the SiteMapDataSource control.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class SiteMapDataSourceView : DataSourceView

The SiteMapDataSource control enables ASP.NET data-bound controls, such as the TreeView and Menu controls, to bind to site map data. The SiteMapDataSourceView class is used by controls developers but it is not used by page developers nor in page code.

The SiteMapDataSource returns a SiteMapDataSourceView for a specified hierarchical path when the Select method is called. Like all hierarchical data source view objects, the SiteMapDataSourceView is not named; rather, its is identified by its unique hierarchical path.

The SiteMapDataSourceView is a wrapper class on a SiteMapNodeCollection collection. The SiteMapNodeCollection class implements the IHierarchicalEnumerable interface, which the SiteMapDataSourceView class returns from a call to Select method. Because the SiteMapDataSource and SiteMapDataSourceView work with SiteMapNode objects, the view maintains an internal SiteMapNodeCollection to contain them. The collection is initialized using the view's constructors and accessed with the Select method.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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.

.NET Framework

Supported in: 3.5, 3.0, 2.0