I'm looking for a way to preserve query string parameters when navigating back up the stack using the standard <asp:SiteMapPath>
implementation.
For simplicity, suppose I have a Animal > Breed
page stack:
<siteMapNode url="~/Animal.aspx" title="Animal" >
<siteMapNode url="~/Breed.aspx" title="Breed"/>
</siteMapNode>
I navigate to Animal.aspx?type=Dog
and select a dog breed to navigate to Breed.aspx?type=Bulldog
On Breed.aspx
I have the correct breadcrumb Animal > Breed
but the Animal
url is just Animal.aspx
. How can I get the Animal link to be the parent/previous page Animal.aspx?type=Dog
?
In this simplistic example I realise I could feasibly add all the animal type as separate nodes with their relevant type. My actual setup is more complicated and requires ids to be read from the a database.