I am currently porting an application from SharePoint 2007 to 2010. As a single page can be invoked in different contexts, we rely on a code based SiteMapResolveEventHandler to dynamically populate the breadcrumb.

This all works great in SharePoint 2007, but for some reason in SharePoint 2010 it doesn't hit the 'SPXmlContentMapProvider' event handler even though this provider is available in the list of SiteMap.Providers.

If I hook up the event to a different provider, e.g. the CombinedNavSiteMapProvider then it does trigger the event handler, but this provider does not contain the nodes I am interested in.

The following code is being used (and works fine in SP2007)

In the application page's OnLoad

SiteMap.Providers["SPXmlContentMapProvider"].SiteMapResolve += new SiteMapResolveEventHandler(provider_SiteMapResolve);

which calls the following method (simplified version)

public SiteMapNode provider_SiteMapResolve(object sender, SiteMapResolveEventArgs e)
    e.Provider.EnableLocalization = false;

    // ** First request uses the current user's account to load sitemap file, so elevate.
        SiteMapNode listNode = e.Provider.RootNode.ChildNodes[0].Clone();
        listNode.Url = "http://some url";
        listNode.Title = "Some title";
        listNode.ChildNodes = new SiteMapNodeCollection();

        SiteMapNode pageTitleNode = new SiteMapNode(e.Provider, Guid.NewGuid().ToString());
        pageTitleNode.Title = "Some sub title";
        pageTitleNode.ParentNode = listNode;

    return pageTitleNode;

I have checked that the event handler is never invoked by adding trace logging to the method as well as breakpoints.

2 Answers 2


In SharePoint 2010 Application pages need to override the PlaceHolderTitleBreadcrumb section from v4.master in order to specify that the SPXMLContentMapProvider be used. This will allow the breadcrumb control to work. Additionally the title area needs to be adjusted to show a "breadcrumb like" navigation.

I've posted all of the code changes required on my blog: http://blogs.visigo.com/chriscoulson/adding-breadcrumb-navigation-to-sharepoint-2010-application-pages/


Have u tried using another Provider? I think SP2010 uses SPSiteMapProvider or SPContentMapProvider...

  • I looked at all providers registered in the system and tried them all without luck. Dec 8, 2010 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.