keslavi
keslavi

Reputation:

sitemap shortcoming

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?

Upvotes: 1

Views: 336

Answers (3)

Wyatt Barnett
Wyatt Barnett

Reputation: 15663

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

Upvotes: 0

Ian Oxley
Ian Oxley

Reputation: 11056

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.

Upvotes: 0

Kyle Sonaty
Kyle Sonaty

Reputation: 573

Try this:

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

Upvotes: 2

Related Questions