October 2010
Intermediate to advanced
1920 pages
73h 55m
English
DataBound ControlsA hierarchical DataBound control can display nested data items. For example, you can use hierarchical DataBound controls to display the folder and page structure of your website, the contents of an XML file, or a set of master/detail database records.
The ASP.NET 4 Framework includes two hierarchical DataBound controls:
• Menu—
Displays data items in a static or dynamic menu.
• TreeView—
Displays data items in a tree.
The page in Listing 8.3 illustrates how you can use both the Menu and TreeView controls. Both controls are bound to an XmlDataSource control, which represents the XML file in Listing 8.4 (see Figure 8.3).
Figure 8.3. Using hierarchical DataBound controls.
Listing 8.3. ShowHierarchicalDataBound.aspx ...