SiteMapPath with query strings

Jan 6, 2010 at 2:24 PM

I am using ASP.NET MVC 2, and I am having some problems building a SiteMapPath with query strings.

My web.sitemap looks something like this:
<mvcSiteMapNode title="$resources:web.sitemap,SomeText" controller="SomeController" action="SomeAction" isDynamic="true" dynamicParameters="id">
  <mvcSiteMapNode title="$resources:web.sitemap,SomeText" controller="SomeController" action="SomeAction" isDynamic="true" dynamicParameters="id" />
  <mvcSiteMapNode title="$resources:web.sitemap,SomeText" controller="SomeController" action="SomeAction" isDynamic="true" dynamicParameters="id" />
  <mvcSiteMapNode title="$resources:web.sitemap,SomeText" controller="SomeController" action="SomeAction" isDynamic="true" dynamicParameters="id">
         <mvcSiteMapNode title="$resources:web.sitemap,SomeText" controller="SomeController" action="SomeAction" isDynamic="true" dynamicParameters="id" />
   </mvcSiteMapNode>
</mvcSiteMapNode>

Most of the urls in my application has query strings. (http://www.somesite.com/somecontroller/someaction/?id=15317aae-b54e-4852-a8c1-d7be8a29bd01)

The SiteMapPath displays fine, but the problem is with the url on the parent nodes.

Example if the SiteMapPath looks like this:

Some node -> Some node -> Some node

If I use my menu to navigate, the url to a page would be something like  http://www.somesite.com/controller/action/?id=15317aae-b54e-4852-a8c1-d7be8a29bd01. If i navigate to a child node of this page, the link back to the parent node in the SiteMapPath does not have the querystring( http://www.somesite.com/controller/action/).

Am I missing something here or could this not be done with this provider?

I hope you understand my question :)

Thanks Magne.