Click here to Skip to main content
14,869,580 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
Dear Friends,

In my application i want to put SiteMap with navigate URL.Till now i have not worked on this concept.So please give me suggestions,



Regards,

Anilkumar.
Posted

ASP.NET
<asp:treeview id="TreeView1" runat="server" imageset="Simple" datasourceid="SiteMapDataSource1" xmlns:asp="#unknown">
            <hovernodestyle font-underline="True" forecolor="#5555DD" />
            <nodestyle font-names="Tahoma" font-size="10pt" forecolor="Black" horizontalpadding="0px">
                NodeSpacing="0px" VerticalPadding="0px" />
            <parentnodestyle font-bold="False" imageurl="~/Images/bullet-red.png" />
            <rootnodestyle imageurl="~/Images/bullet.png" />
            <selectednodestyle font-underline="True" forecolor="#5555DD" horizontalpadding="0px">
                VerticalPadding="0px" />
        </selectednodestyle></nodestyle></asp:treeview>


<asp:sitemapdatasource id="SiteMapDataSource1" runat="server" xmlns:asp="#unknown" />


Create Web.Sitemap file
HTML
<sitemap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
        <sitemapnode url="http://www.test.com/" title="ASP.NET" description="ASP.NET Tutorials">
          <sitemapnode url="http://www.devmanuals.com/tutorials/ms/aspdotnet/index.html" title="Controls" description="Standards Controls">
            <sitemapnode url="~/TextBox.aspx" title="TextBox" description="TextBox Control" />
            <sitemapnode url="~/BulletList.aspx" title="BulletList" description="BulletList Control" />
            <sitemapnode url="~/Image.aspx" title="Image" description="Image Control" />
            <sitemapnode url="~/ImageMap.aspx" title="ImageMap" description="ImageMap Control" />
          </sitemapnode>
    </sitemapnode>
</sitemap>
   
Comments
Anil Honey 206 16-Aug-11 6:16am
   
Dear Sir,
Thanks for Information But iam not Understand thie concept.Can u give me Clear Information


Regards,

Anilkumar.
senthil sennu 16-Aug-11 6:20am
   
Check this Link, http://www.devmanuals.com/tutorials/ms/aspdotnet/sitemappath.html

Hope this helps!

Senthil S
Hi
The best way to create a sitemap in ASP>NET is creating a xml file.
Check the followings:
http://msdn.microsoft.com/en-us/library/yy2ykkab.aspx
http://www.codeproject.com/KB/aspnet/dynamicsitemap.aspx
   
v2
Comments
Simon Bang Terkildsen 16-Aug-11 5:37am
   
Updated your links so they don't send us to CP's 404 page
here are some Code Project articles
Simple Sitemaps in ASP.NET[^]
Sitemap and Sitemap Index Generator[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900