是否可以在母版页应用程序中有2个站点地图 [英] Is it possible to have 2 sitemaps in a master page application

查看:185
本文介绍了是否可以在母版页应用程序中有2个站点地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我有一个小问题,



我正在创建一个使用母版页的网络应用程序。应用程序有一组客户端可以访问的页面,它们从Site.master继承。它还有一组员工可以访问的页面,而这些页面又从Admin.master继承。



我使用了2个站点地图文件:Admin.sitemap和Web.sitemap 。我还在每个主人中使用面包屑控制:



Hi there everyone, I have a small problem,

Im creating a web app that uses master pages. the application has a set of pages that clients can access and they inherit from a Site.master. It also has a set of pages that employees can access which in turn inherit from Admin.master.

I have employed 2 sitemap files: Admin.sitemap and Web.sitemap. I have also used bread crumb controls in each master:

<
<asp:SiteMapDataSource ID="smDS" ShowStartingNode="true" SiteMapProvider="adminSmProvider"  runat="server" />
                <asp:SiteMapPath ID="breadCrumb" runat="server" Font-Names="Verdana" 
            Font-Size="0.8em" PathSeparator=" : "  >
                    <CurrentNodeStyle ForeColor="#333333" />
                    <NodeStyle Font-Bold="True" ForeColor="#284E98" />
                    <PathSeparatorStyle Font-Bold="True" ForeColor="#507CD1" />
                    <RootNodeStyle Font-Bold="True" ForeColor="#507CD1" />
        </asp:SiteMapPath>/pre>

and in site.master:

<pre lang="c#"><asp:SiteMapDataSource ID="smDS" ShowStartingNode="true" SiteMapProvider="smProvider"  runat="server" />
                <asp:SiteMapPath ID="breadCrumb" runat="server" Font-Names="Verdana" 
            Font-Size="0.8em" PathSeparator=" : "  >
                    <CurrentNodeStyle ForeColor="#333333" />
                    <NodeStyle Font-Bold="True" ForeColor="#284E98" />
                    <PathSeparatorStyle Font-Bold="True" ForeColor="#507CD1" />
                    <RootNodeStyle Font-Bold="True" ForeColor="#507CD1" />
        </asp:SiteMapPath>





我还在web.config中安排了他们的供应商





I have also placed thier providers in the web.config

<system.web>
  <siteMap>
    <providers>
      <add name="adminSmProvider" type="System.Web.XmlSiteMapProvider" siteMapFile="~/Admin.sitemap"/>
      <add name="smProvider" type="System.Web.XmlSiteMapProvider" siteMapFile="~/Web.sitemap"/>
    </providers>





现在我的问题是,虽然面包屑显示在从Site.master继承的页面中,它不适用于从Admin.master继承的那些。但是当我调试时我没有收到任何错误。



任何想法?



Now my issue is that while the breadcrumbs display in the pages that inherit from Site.master, it does not work on those which inherit from Admin.master. However I do not get any errors when I debug..

Any Ideas?

推荐答案

这篇关于是否可以在母版页应用程序中有2个站点地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆