views:

103

answers:

3

I am constrained to using a SiteMap for authentication. I am an experienced developer that has not had to use the SiteMap previously, so I am probably missing something due to the paradigm shift.

in order to get around the url limitation in SiteMap, I <doh!>cleverly</doh!> appended a querystring value:

    <siteMapNode url="workflow.aspx?Location=Process1" description="Process1">

    <siteMapNode url="workflow.aspx?Location=Process2" description="Process2">

the page dynamically returns the appropriate information/display based on the querystring value, and I don't have multiple stub pages. everything worked and it seemed like a good idea, until...

managers now want to access the page and edit their employee's work aliased as them, so they need to click a link like this:

    href=workflow.aspx?Location=Process1&UserID=12&IDWorkflowLocation=3340

{update to explanation} it arrives at the page correctly, but

    SiteMap.CurrentNode==null;

because there is already a querystring in the sitemap it doesn't append correctly. I reaally don't want to have to make uniquely named stub .aspx pages. any ideas?

+2  A: 

Try this:

href=workflow.aspx?Location=Process1&amp;UserID=12&amp;IDWorkflowLocation=3340
Kyle Sonaty
nope. it reaches the destination page, but then the SiteMap.CurrentNode ==null
A: 

Have you tried programmatically modifying the site map nodes at runtime? This article explains how: http://msdn.microsoft.com/en-us/library/ms178425.aspx

I have used this in the past, but I seem to remember that the SiteMapResolve event fires on every request (even if you define it on a specific WebForm).

Hope this helps.

Ian Oxley
Thank you, i took a look at this, but because the Sitemap.CurrentNode property is null when it arrives at the page this doesn't work.
apparently the problem is that because SiteMap already contains a querystring it is unable to process further querystring parameters.
A: 

You need to extend the SiteMap class, override the CurrentNode property and get some of your own logic in there to catch this.

Wyatt Barnett
Thank you, I'll do that.
Agreed. Override CurrentNode in the provider and return the node matched by the Http request.
Ed Blackburn