O'Reilly logo

Applied ASP.NET 4 in Context by Adam Freeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the Navigation Controls

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required