The Menu and
TreeView navigation controls both support data binding, but only to hierarchical data. This means that you can use them with site map files (as discussed in Chapter 15) or with XML documents.
In this section, I'll show you how to use these controls with XML. This is a slightly different approach from the one in the previous chapter, because we want to preserve the hierarchical structure of the XML document, rather than use LINQ to extract specific values.
To begin, create a new project using the Visual Studio
Empty ASP.NET Application template and add a new XML file called
Data.xml. The contents of this file are shown in Listing 19-2. Create the special ASP.NET folder
App_Data and place the XML file ...