1. Open Visual Studio
2. Create a New Website
3. In Solution Explorer Right Click -> Add New Item -> SiteMap - > Give Name and Click Add.
4. Write code in the Web.sitemap file as below.
<?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="Home">
<siteMapNode url="Login.aspx" title="Login" description="Login" />
<siteMapNode url="Registration.aspx" title="Registration" description="Registration" />
</siteMapNode>
</siteMap>
5. Add New Web Page.
6. Add TreeView on Page.
7. Right-click Treeview -> go to Properties ->Choose DataSourceID -> New Data Source
2. Create a New Website
3. In Solution Explorer Right Click -> Add New Item -> SiteMap - > Give Name and Click Add.
4. Write code in the Web.sitemap file as below.
<?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="Home">
<siteMapNode url="Login.aspx" title="Login" description="Login" />
<siteMapNode url="Registration.aspx" title="Registration" description="Registration" />
</siteMapNode>
</siteMap>
5. Add New Web Page.
6. Add TreeView on Page.
7. Right-click Treeview -> go to Properties ->Choose DataSourceID -> New Data Source
8. Select the Site Map.
9. Click F5.
No comments:
Post a Comment
Thanks