G
Guest
First look at: http://msdn2.microsoft.com/en-us/library/ms178425(VS.80).aspx
I've tried this, and while the code sort of works, the modified SiteMapNodes
get stuck in memory and can't be modified on other requests without having to
kill the aspnet_wp manually.
ISSUE: I need to modify the URL and TITLE of the last link on the
SiteMapPath (breadcrumb) control. I have a parent page called "companies"
that displays a list of results. Clicking on a company should take you to
the "details" page passing along the ID on the querystring. Now, when you
get to the details page I need to append that ID on to the current node and
change the title to the name of the company.
Take a sample from the sitemap:
<siteMapNode url="Companies/default.aspx" title="Companies"
description="Companies">
<siteMapNode url="Companies/manage.aspx" title="Manage"
description="Manage"></siteMapNode>
<siteMapNode url="Companies/view.aspx" title="View"
description="View"></siteMapNode>
</siteMapNode>
When viewing the list the SiteMapPath renders correctly as:
Home / Companies
When I follow the MS example and when the user is on the details page the
control renders as:
Home / Companies / Company ABC [/Companies/view.aspx?id=123]
All looks good. But, when you go back to the list and select a different
company you end up with the same rendering even through the URL in the
broswer has the ID of the new company.
Home / Companies / Company ABC [/Companies/view.aspx?id=123]
should be
Home / Companies / Company XYZ [/Companies/view.aspx?id=789]
The only way I get the SiteMapPath to refresh correctly is to manually kill
the aspnet_wp and refresh the page. But then it's stuck on Company XYZ.
Also, if I make a change to the SiteMap file, changes are reflected until I
kill the aspnet_wp.
Environment: XP SP2 & VS.NET '05
I've tried this, and while the code sort of works, the modified SiteMapNodes
get stuck in memory and can't be modified on other requests without having to
kill the aspnet_wp manually.
ISSUE: I need to modify the URL and TITLE of the last link on the
SiteMapPath (breadcrumb) control. I have a parent page called "companies"
that displays a list of results. Clicking on a company should take you to
the "details" page passing along the ID on the querystring. Now, when you
get to the details page I need to append that ID on to the current node and
change the title to the name of the company.
Take a sample from the sitemap:
<siteMapNode url="Companies/default.aspx" title="Companies"
description="Companies">
<siteMapNode url="Companies/manage.aspx" title="Manage"
description="Manage"></siteMapNode>
<siteMapNode url="Companies/view.aspx" title="View"
description="View"></siteMapNode>
</siteMapNode>
When viewing the list the SiteMapPath renders correctly as:
Home / Companies
When I follow the MS example and when the user is on the details page the
control renders as:
Home / Companies / Company ABC [/Companies/view.aspx?id=123]
All looks good. But, when you go back to the list and select a different
company you end up with the same rendering even through the URL in the
broswer has the ID of the new company.
Home / Companies / Company ABC [/Companies/view.aspx?id=123]
should be
Home / Companies / Company XYZ [/Companies/view.aspx?id=789]
The only way I get the SiteMapPath to refresh correctly is to manually kill
the aspnet_wp and refresh the page. But then it's stuck on Company XYZ.
Also, if I make a change to the SiteMap file, changes are reflected until I
kill the aspnet_wp.
Environment: XP SP2 & VS.NET '05