Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Data Binding

v
v

This demo illustrates the binding of an ASPxSiteMapControl to a data source. The ASPxSiteMapControl supports standard data binding options. In this instance any object which implements the IHierarchicalEnumerable or IHierarchicalDataSource interface (e.g. SiteMapDataSource, XmlDataSource) may be used as a data source for this control.

In this demo, the site map control is bound to a data source of type ASPxSiteMapDataSource. The ASPxSiteMapDataSource is connected with a specific SiteMapProvider. This provider is registered in the web.config file where it's pointed to the file from which to obtain the site map data. Note that the ASPxSiteMapDataSource extends the functionality of a standard site map data source component by allowing the site map data to be loaded from a specific file without assigning a site map provider to the SiteMapProvider property.

<siteMap>
    <providers>
        <add name="ProductsWebSiteProvider" type="System.Web.XmlSiteMapProvider"
            siteMapFile="SiteMapProducts.sitemap"/>
        <add name="MenuSiteMapProvider" type="System.Web.XmlSiteMapProvider"
            siteMapFile="~/App_Data/Menu.sitemap"/>
    </providers>
</siteMap>

Collapse/Expand
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
Open VB Solution
The source code files for this demo are installed (by default) in the following directories:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\ASPxNavigationAndLayoutDemos
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\VB\ASPxNavigationAndLayoutDemos