Untitled document
For this purpose TreeView is used
Add new siteMap file in your file that is web.sitemap:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default.aspx" title="Home" description="This is home page">
<siteMapNode url="Default2.aspx" title="Child1" description="Child1" />
<siteMapNode url="Default3" title="Child2" description="Chil2" />
</siteMapNode>
</siteMap>
Now Add Tree Control + SiteMapDataSource and set the Datasource property of TreeView:
<asp:TreeView ID="TreeView2" runat="server" DataSourceID="SiteMapDataSource1">
</asp:TreeView>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />