The TreeView control contains a hierarchy of TreeViewItem controls. You can use the TreeView control to display information from a wide variety of data sources such as an XML file, site-map file, string, or from a database. It provides a way to display information in a hierarchical structure by using collapsible nodes . The top level in a tree view are root nodes that can be expanded or collapsed if the nodes have child nodes.
The user can expand the TreeNode by clicking the plus sign (+) button, if one is displayed next to the TreeNode, or you can expand the TreeNode by calling the TreeNode.Expand method
The fullpath method of treeview control provides the path from root node to the selected node.
The following ASP.NET program shows how to load data from an XML file to a Treeview control. The XML file you can download from
Click the following links to see full source code