sitemap可以用于动态绑定菜单连接。
sitemap 动态绑定        protected void BindMenuTree()
        }

Addnode:
sitemap 动态绑定        private void AddNode(TreeNode parentNode, XmlNode thisNode, string appendfix)
    这里首先通过 Server.MapPath取得sitemap文件的物理地址。而后解释xml文档,并将xml文档sitemap中的节点按其在该文档中的层次结构映射到页面中的Treeview中。
另外,还可以使用<asp:sitemapdatasource runat="server"   来实现数据绑定。
   在使用SiteMapDataSource时,如果应用程序存在多个SiteMapDataSource控件,就必须设置SiteMapDataSource的SiteMapProvider属性。该属性取值为当前web.
sitemap 动态绑定    <system.web>   
sitemap 动态绑定        
<siteMap>
sitemap 动态绑定            
<providers>
sitemap 动态绑定               
<add name="web1sitemap" type="System.Web.XmlSiteMapProvider" siteMapFile="~/web1.sitemap" />
sitemap 动态绑定               
<add name="web2sitemap" type="System.Web.XmlSiteMapProvider" siteMapFile="~/web2.sitemap" />
sitemap 动态绑定            
</providers>
sitemap 动态绑定        
</siteMap>
sitemap 动态绑定    
</system.web>
文件下的
<siteMap>节点中提供的内容。

<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" SiteMapProvider="" />

相关文章:

  • 2021-09-18
  • 2021-08-24
  • 2021-08-08
猜你喜欢
  • 2021-10-26
  • 2021-12-28
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案