.NET
  Home arrow .NET arrow Page 2 - Web Site Navigation Using a SiteMap
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
.NET

Web Site Navigation Using a SiteMap
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 8
    2006-11-15

    Table of Contents:
  • Web Site Navigation Using a SiteMap
  • Adding a SiteMap to the site
  • Site Navigation with Menu Control
  • Where should we place the menu control?

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Web Site Navigation Using a SiteMap - Adding a SiteMap to the site


    (Page 2 of 4 )

    After highlighting the project, right click to access the drop-down menu. Click on Add New Item... which brings up the following window.

    When you highlight the SiteMap icon you will find Web.sitemap as the name of the file. If you click on the Add button this file will be added to your site as shown. Before clicking the Add button you may choose a name of your own, but do not change the extension. Extensions such as *.sitemap and *.config are protected by ASP.NET for security reasons.

    Site structure is in an XML file

    Web.sitemap is an XML file with a special structure. It comes with a default template for a folder and a folder/file structure with three attributes, URL, Title, and Description as shown. In a rendered page these can be seen in the address bar, item's control name, and a tool-tip text showing the description.

    Here <siteMap/> is the root and it has <siteMapNode/> children. These children represent the folder. These children also contain children which are the files in the folder. As shown here, the default that is added has three <siteMapNodes/> which can be used to represent one folder and two files in the folder.

    The SiteMap XML file has been modified to reflect the folder structure shown earlier, as shown in the next picture. Only the structure of the ColdFusionMX61 folder has been partially implemented in this file. Also shown is the provision made for the MSAccess Folder to contain the files DAP.aspx and Ado.aspx. It must be remembered that all the ASPX files will be ContentHolder files (refer to the Master Page tutorial). The title, URL and description values for both the ColdFusionMX61 folder and the file it contains have been added to the declaration. The comments should help in identifying these attributes.

    Add the structure of the MSAccess folder along the same lines. Make use of intellisense at every step as shown. This will add to the correctness of the formatting.

    The completed Web.sitemap file is shown in the next paragraph.

    <?xml version="1.0" encoding="utf-8" ?>
    <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    <!--Home Page--> <siteMapNode url="~/Default.aspx" title="Home" description="Home Page"> <!--ColdFusionMX61 Folder &
    Contents-->
    <-- Folder --> <siteMapNode title="ColdFusionMX61" url="~/ColdFusionMX61/Default.aspx" Description="CFMX Tutorials"> <-- File -->
    <siteMapNode url="~/ColdFusionMX61/Coldfusion.aspx" title="CFMX" description="All tutorials on CFMX" /> </siteMapNode> <!--MS Access Folder & Files--> <-- Folder -->
    <siteMapNode title="MSAccess" url="~/MSAccess/Default.aspx" description="MS Access 2003 related">
    <-- Two Files -->
    <siteMapNode title="ActiveXDataObjects" url="~/MSAccess/Ado.aspx" description="Using MS Access Application"/> <siteMapNode title="Data Access Pages" url="~/MSAccess/DAP.aspx" description="Enabling for the web"/> </siteMapNode> </siteMapNode> </siteMap>

    More .NET Articles
    More By Jayaram Krishnaswamy


       · A good navigation system is essential for user satisfaction. Can you always comeback...
       · My problem is explained in the falowing:Compiler Error Message: CS0716: Cannot...
       · I am sorry you have a problem. Could you kindly explain what you are trying to...
     

    .NET ARTICLES

    - Building Applications with Windows Workflow ...
    - Building the Data and Business Layers Using ...
    - The Transformed XML Explorer in MFC
    - List Control and Property Grid with the MFC ...
    - Font, Shell and Masked Edit Controls for MFC
    - Color, Link and Image Editor Controls for M...
    - New Controls for MFC
    - The Windows Ribbon Framework
    - Markup Language for the Ribbon Framework
    - Visually Upgrade Your MFC Project
    - New Features for the Statusbar in MFC
    - Working with the Statusbar in MFC
    - Iron Speed Design v60 Review
    - Binary and XML Serialization
    - Using CrystalReportViewer to Display Crystal...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek