etlds
etlds

Reputation: 5890

xmlsitemapprovider multiple nodes with same URL

Google it around but cannot get the answer.

<siteMapNode url="~/BV1Menu.aspx" title="Baseline Visit 1 Menu" description="Baseline Visit 1 Menu">
    <siteMapNode url="~/Forms/RAND.aspx" title="RAND" description="RAND BV1" />
    <siteMapNode url="~/Forms/PDQ.aspx" title="PDQ 39" description="PDQ 39" />
    <siteMapNode url="~/Forms/HSU.aspx" title="Health Status Update" description="Health Status Update" />
</siteMapNode>
<siteMapNode url="~/MonthlyMenu.aspx" title="Monthly Menu" description="Monthly Menu">
      <siteMapNode url="~/Forms/HSU.aspx" title="Health Status Update 1" description="Health Status Update" />
</siteMapNode>

As you can see I have 2 "~/Forms/HSU.aspx" here, so it give me a exception said that "Multiple nodes with same URL".

I tried 2 ways to solve it but never achieve. I have a encrypted query string.

  1. Adding "#". When I adding "#" like this "~/Forms/HSU.aspx#?eq=123456789", not working because the eq is null. When I adding "#" like this "~/Forms/HSU.aspx?eq=123456789#", not working because the SiteMap Control always find the first HUS.aspx as current node, and it's parent node would be BV1Menu.aspx.

  2. Adding dummy query string. Not working, the same situation like the 2nd above.

I know there is a URL rewriting solution, but my query string is encrypted, no way to rewrite the URL.

Please help.

Upvotes: 0

Views: 1104

Answers (1)

User1000547
User1000547

Reputation: 4301

Here's an example for a project that I'm working on, it's worked fine for me:

 <siteMapNode url="~/ExperimentsView.aspx?path=htt" title="HTT" />
 <siteMapNode url="~/ExperimentsView.aspx?path=mtt" title="MTT"/>
 <siteMapNode url="~/ExperimentsView.aspx?path=HPLC" title="HPLC"/>
 <siteMapNode url="~/ExperimentsView.aspx?path=UVSpec" title="UV-Spec"/>

Upvotes: 1

Related Questions