站点地图

网站是由许多页面组成的,网站中页面之间的导航,即页面之间的相互连接,随着网站规模的越来越复杂而变得不容易管理。
可采用站点地图来配置页面之间的结构,使用可视化导航控件,如TreeView、SiteMapPath以及Menu控件。
<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
  
<siteMapNode title="Home" description="Home" url="~/home.aspx" >
    
<siteMapNode title="Products" description="Our products"
         url
="~/Products.aspx">
      
<siteMapNode title="Hardware" 
           description
="Hardware we offer" 
           url
="~/Hardware.aspx" />
      
<siteMapNode title="Software" 
           description
="Software for sale" 
           url
="~/Software.aspx" />
    
</siteMapNode>
    
<siteMapNode title="Services" description="Services we offer" 
        url
="~/Services.aspx">
      
<siteMapNode title="Training" description="Training" 
          url
="~/Training.aspx" />
      
<siteMapNode title="Consulting" description="Consulting" 
          url
="~/Consulting.aspx" />
      
<siteMapNode title="Support" description="Support" 
          url
="~/Support.aspx" />
    
</siteMapNode>
  
</siteMapNode>
</siteMap>
站点地图文件是一个XML格式的文件,通过该文件实现站点结构的集中管理。第一个层次是Home.aspx页面,第二个层次是Products.aspx页面和Services.aspx页面。
原文地址:https://www.cnblogs.com/qixin622/p/774800.html