1) create one XML file then drag & drop TreeView control on to the page and click on smart navigator of treeview control ,choose data source as a
XmlDataSource,select the XML File Path.
Example
MenuXML.xml
<code>
<?xml version="1.0" encoding="utf-8" ?>
<Root>
<Parent1>
<Child1></Child1>
<Child2></Child2>
</Parent1>
<Parent2>
<Child1></Child1>
<Child2></Child2>
<Child3></Child3>
</Parent2>
</Root>
</code>
In a web page
<asp:treeview id="TreeView1" runat="server" datasourceid="XmlDataSource1" imageset="XPFileExplorer" nodeindent="15" xmlns:asp="#unknown">
<parentnodestyle font-bold="False" />
<hovernodestyle font-underline="True" forecolor="#6666AA" />
<selectednodestyle backcolor="#B5B5B5" font-underline="False">
HorizontalPadding="0px" VerticalPadding="0px" />
<nodestyle font-names="Tahoma" font-size="8pt" forecolor="Black">
HorizontalPadding="2px" NodeSpacing="0px" VerticalPadding="2px" />
</nodestyle></selectednodestyle></asp:treeview><br />
<asp:xmldatasource id="XmlDataSource1" runat="server" datafile="~/MenuFile.xml" xmlns:asp="#unknown" />