asp.net.ph

Skip Navigation Links

SiteMapDataSource Control Syntax

ASP.NET Syntax   ASP.NET Syntax for Web Controls


Provides a data source control that Web server controls and other controls can use to bind to hierarchical site map data.

Declarative Syntax

For information on the individual members of this class, see SiteMapDataSource in the class library.

Remarks

The SiteMapDataSource control is a data source to the site map data that is stored by the site map providers that are configured for your site. The SiteMapDataSource enables Web server controls that are not specifically site navigation controls, such as the TreeView, Menu, and DropDownList controls, to bind to hierarchical site map data. You can use these Web server controls to display a site map as a table of contents or to actively navigate a site. Alternatively, you can use the SiteMapPath control, which is designed specifically as a site navigation control and therefore does not need an instance of the SiteMapDataSource control.

For more information on using the SiteMapDataSource control, see SiteMapDataSource Web Server Control.

Syntax Example

The following example demonstrates how to declaratively bind a TreeView control to a site map using a SiteMapDataSource control. The site map data is retrieved beginning at the root node level.

<asp:treeview id="myTreeView" runat="server"
   datasourceid="siteMap"
   expanddepth=1 />

<asp:sitemapdatasource id="siteMap" runat="server" />

 Show me 

See Also

SiteMapDataSource Class   SiteMapDataSource Web Server Control



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note