Question

I want to add some random querystring params to some pages in my site, but for pages currently defined with query strings, SiteMap.CurrentNode fails with the new params. Pages/Nodes that are not defined with querystrings don't mind the new params added.

I use the sitemap nodes to build the headers and breadcrumbs.

Is there a way to get SiteMap.CurrentNode to show up as what is defined in the sitemap as

 "whatever.aspx?definedparam=definedvalue"

instead of breaking for

"whatever.aspx?definedparam=definedvalue&newparam=dynamicvalue"

?

Was it helpful?

Solution

You will need to override the xmlsitemapprovider class: http://www.nullskull.com/q/10386803/persistence-of-query-string-with-sitemap-url.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top