Skip to Content
ASP.NET 3.5 For Dummies®
book

ASP.NET 3.5 For Dummies®

by Ken Cox
February 2008
Intermediate to advanced
428 pages
8h 52m
English
For Dummies
Content preview from ASP.NET 3.5 For Dummies®

11.1. Using a Treeview on a Web Page

If you've used a computer, you know what a treeview is. It's a compact way of presenting hierarchical information. A treeview is one of the most popular navigation components because it doesn't overwhelm you. You can expand each leaf (also called a node) as required to discover more information and hide irrelevant parts.

NOTE

Figure 11-1 shows that an ASP.NET TreeView looks more like an upside-down tree or a big root. In fact, it starts with a Root node and spreads out and down like a root. Whatever it is, this section gets to the root of using a treeview as a navigation device on a Web page.

Figure 11-1. Although traditionally called a treeview, the control looks more like a root.

11.1.1. Creating TreeView nodes in the designer

Visual Web Developer provides a graphical interface for building and nudging nodes on a treeview. Follow these instructions to configure a treeview on a Web page or master page:

  1. From the Navigation section in the Toolbox, drag and drop a TreeView control onto an ASP.NET page.

  2. Using the Smart Tag, open the Tasks menu and choose AutoFormat.

    The AutoFormat window appears.

  3. Select a format (for example, News) and click OK.

  4. From the Tasks menu, choose Edit Nodes.

    The TreeView Node Editor appears.

  5. In the Nodes area, click the Add Root Node button.

    The Add Root Node button is on the far left in Figure 11-2.

  6. In the Properties area, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ASP.NET 3.5 Unleashed

ASP.NET 3.5 Unleashed

Stephen Walther
ASP.NET 4 Unleashed

ASP.NET 4 Unleashed

Stephen Walther, Kevin Hoffman, Nate Dudek

Publisher Resources

ISBN: 9780470195925Purchase book