At last, a TreeView control that comes right in the box of Visual Studio 2005.
If you have ever visited the MSDN Library site, you will no doubt have noticed the tree-like navigational menu on the left side of its home page (see Figure 2-24).
Figure 2-24. The tree-like navigation on the MSDN site
This information is displayed using the TreeView control, which provides an alternative to the SiteMapPath control for navigating your site. Tree maps are great for displaying hierarchical information and, unlike the SiteMapPath control, they let you browse the entire site, not just the path leading to your current page.
Using the project created in the last lab, let's add a TreeView control to the site. You'll do this by adding the control to your Master page and binding it to your site map so that users can navigate your site by directly clicking the items in the TreeView control.
In the MasterPage.master Master page, add a 2 1 table (Layout→ Insert Table). Add a TreeView control to the left cell of the table and drag the ContentPlaceHolder control into the right cell (see Figure 2-25).
Figure 2-25. Populating the Master page
In the TreeView Tasks menu of the TreeView control, select <New data source...> (see Figure 2-27). ...