ASP.NET Menu. ExpertMenu - Advanced Server-Side Menu Control for ASP.NET

Examples Quick Start ExpertMenu Designer Contact Us


About the demo
This demo shows how to bind ExpertMenu to a XmlDataSource control.
All you need to do for this is to set menu's DataSourceID property to the ID of the XmlDataSource control.
You can define a number of DataBindings and nested PropertyBindings to map menu item properties to data members and data fields.
Here three DataBindings are defined for three different XML elements named Book, Chapter and Section. Every DataBinding also defines how menu item properties bind to Xml attributes.

<DataBindings>
    <ec:DataBinding DataMember="Book">
        <PropertyBindings>
            <ec:PropertyBinding Property="Text" DataField="Title" />
        </PropertyBindings>
    </ec:DataBinding>
    <ec:DataBinding DataMember="Chapter">
        <PropertyBindings>
            <ec:PropertyBinding Property="Text" DataField="Heading" />
        </PropertyBindings>
    </ec:DataBinding>    
    <ec:DataBinding DataMember="Section">
        <PropertyBindings>
            <ec:PropertyBinding Property="Text" DataField="Heading" />
            <ec:PropertyBinding Property="PostBackOnClick" Value="True"  />
        </PropertyBindings>
    </ec:DataBinding>    
</DataBindings>

    
You can define a number of PropertyBindings to map additional item properties to other Xml attributes or assign them arbitrary values.
You can also define a handler for ItemDataBound server-side event for fine tuning the bound properties or even cancel creating the item.
aspx Book.xml

Copyright © 2003-2006 ASP.NET Expert Group. All rights reserved.