0

嗨,我需要构建动态层次结构站点地图。这是我的xml

<!--company tab-->
  <siteMapNode url="~/Module/EB/Company/CompanyList.aspx" title="Company list"  description="Company List"  >
    <siteMapNode url="~/Module/EB/Company/CompanyDetail.aspx" title="Company Detail Setup"  description="Company Detail Setup"  >
      <siteMapNode url="~/Module/EB/Employee/EmployeeDetail.aspx" title="Employee Detail Setup"  description="Employee Detail Setup" >
        <siteMapNode url="~/Module/EB/Employee/EmployeeDependentDetail.aspx" title="Employee Dependent Setup"  description="Employee Dependent Setup" >
        </siteMapNode>
      </siteMapNode>
    </siteMapNode>
  </siteMapNode>
  <!--company tab-->

  <!--Employee tab-->
  <siteMapNode url="~/Module/EB/Employee/EmployeeList.aspx" title="Employee list"  description="Employee List" >
     <siteMapNode url="~/Module/EB/Employee/EmployeeDetail.aspx" title="Employee Detail Setup"  description="Employee Detail Setup" >
        <siteMapNode url="~/Module/EB/Employee/EmployeeDependentDetail.aspx" title="Employee Dependent Setup"  description="Employee Dependent Setup" >
        </siteMapNode>
      </siteMapNode>
  </siteMapNode>

网站菜单.aspx

<asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-Names="Microsoft New Tai Lue" 
                  Font-Size="0.9em" PathSeparator=" : " SkipLinkText="" Font-Bold="False" 
                  style="font-family: 'Times New Roman', Times, serif; font-size: small" 
                  Visible="True"  Enabled="false">
                  <CurrentNodeStyle ForeColor="#333333" Font-Underline="True" />
                  <NodeStyle Font-Bold="True" ForeColor="#284E98" />
                  <PathSeparatorStyle Font-Bold="True" ForeColor="#507CD1" />
                  <RootNodeStyle Font-Bold="True" ForeColor="#507CD1"  />

              </asp:SiteMapPath>

所以 nw 是我的问题。在我的公司选项卡中,我可以访问员工详细信息(EmployeeDetail.aspx)选项卡。在我的员工选项卡中,我还可以访问员工 detail.aspx

但我得到了错误。XmlSiteMapProvider 要求站点地图节点具有唯一的 URL。

有什么解决办法吗?

4

1 回答 1

0

我没有足够的声誉来对您的问题发表评论,但是您是否尝试过在您的员工详细信息链接的末尾放置一个查询字符串。它不必是您的代码明确引用的任何内容,只要足以使其与众不同 - 例如:

<siteMapNode url="~/Module/EB/Employee/EmployeeDependentDetail.aspx?key=value1" title="Employee Dependent Setup"  description="Employee Dependent Setup" >
于 2013-07-18T14:26:49.650 回答