您好我需要构建动态层次结构站点地图。这是我的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>
sitemenu.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>
所以,这是我的问题。在我的公司标签中,我可以访问员工详细信息( EmployeeDetail.aspx )标签。在我的员工选项卡中,我还可以访问员工detail.aspx
但是我得到了错误。 XmlSiteMapProvider要求站点地图节点具有唯一的URL。
任何解决方案?
答案 0 :(得分:0)
我没有足够的声誉对您的问题发表评论,但您是否尝试在员工详细信息链接的末尾添加查询字符串。它不一定是你的代码明确指出的任何东西,只是足以让它与众不同 - 例如:
<siteMapNode url="~/Module/EB/Employee/EmployeeDependentDetail.aspx?key=value1" title="Employee Dependent Setup" description="Employee Dependent Setup" >