troubleshooting Question

dynamic page title using sitemap

Avatar of IUAATech
IUAATech asked on
ASP.NET
9 Comments1 Solution403 ViewsLast Modified:
I am trying to display page titles using the code from this article: http://aspnet.4guysfromrolla.com/articles/051006-1.aspx

code:
                    // Dynamic heading for the page using SiteMap
                    string title = "My Site";
                    if (SiteMap.CurrentNode != null)
                    {
                        SiteMapNode current = SiteMap.CurrentNode;
                        title = current.Title;
                        current = current.ParentNode;

                        while (current != null)
                        {
                            title = string.Concat(current.Title, " :: ", title);
                            current = current.ParentNode;
                        }
                    }

                    // finally, set the page's title to the title variable
                    Page.Title = title;

This works great. However, my scenario is a bit different. In the login page, I ask users to select the application they would like to use and based on that applicationId, I need the root note to be different.

so if they select app1, I want the title to be
app1 :: path1 :: subpath1
and if they select app2, I want the title to be
app2 :: path1 :: subpath1

I have access to the applicationId in the masterpage, but I haven't been able to update the code above to meet my needs. Can someone please help me?
ASKER CERTIFIED SOLUTION
BurntSky

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros