dotnetspider.com
Login Login    Register      

TutorialsForumCareer DevelopmentResourcesReviewsJobsInterviewCommunitiesProjectsTraining

Subscribe to Subscribers
Talk to Webmaster
Tony John

Facebook
Google+
Twitter
LinkedIn
Online MembersShine S
More...
Join our online Google+ community for Bloggers, Content Writers and Webmasters




Forums » .NET » ASP.NET »

How to use sitemap


Posted Date: 03 Jun 2009      Posted By:: Gemi     Member Level: Bronze    Member Rank: 0     Points: 1   Responses: 2



How to use sitemap



Responses

#385006    Author: Ultimaterengan        Member Level: Gold      Member Rank: 9     Date: 03/Jun/2009   Rating: 3 out of 53 out of 53 out of 5     Points: 3

SiteMap

Create menu using SiteMap

1)Right click the Project Name
2)Choose The New Item
3)Choose "SiteMap" From Add NewItem window

Web.DotNetSiteMap Its look like,

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="" title="" description="">
<siteMapNode url="" title="" description="" />
<siteMapNode url="" title="" description="" />
</siteMapNode>
</siteMap>


In Form
1)Add the Menu controls to Form
2)Go to the Property window
3)choose New Datasource from Datasource ID of Menu control
4)DataSource Configuration Wizard window will display
5)then coose the "Site Map"

Example :-

web.SiteMap:-

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="File" title="File" description="File">
<siteMapNode url="Default2.aspx" title="SecondPage" description="ThirdPage" />
<siteMapNode url="Default3.aspx" title="ThirdPage" description="ThirdPage" />
</siteMapNode>
</siteMap>

Default.aspx:-

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1">
</asp:Menu>
 <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
 

</div>
</form>
</body>
</html>




Thanks & Regards
G.Renganathan
Nothing is mine ,Everything is yours!!!


http://renganathan1984.blogspot.com/



 
#385091    Author: Manoranjan Sahoo      Member Level: Gold      Member Rank: 162     Date: 03/Jun/2009   Rating: 2 out of 52 out of 5     Points: 2

Check this link to know detail about sitemap with source code

http://www.codeproject.com/KB/vista/Dynamic_Sitemap.aspx
http://www.4guysfromrolla.com/articles/111605-1.aspx
http://www.dotnetcurry.com/ShowArticle.aspx?ID=262

If it helps you then Rate this.

Regards,
Manoranjan Sahoo
Best .Net Articles & Forum! Join Now



 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : How to create dynamic control
Previous : Timer control
Return to Discussion Forum
Post New Message
Category:

Related Messages



Follow us on Twitter: https://twitter.com/dotnetspider

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Email subscription
  • .NET Jobs
  • .NET Articles
  • .NET Forums
  • Articles Rss Feeds
    Forum Rss Feeds


    About Us    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.