Can someone please provide a definitive explanation of the roles and responsibilities of Navigation Providers, Datasource controls and Menu controls? You seem to be able to apply filtering and trimming in each of these so I'm wondering what the best practices are? I understand that the Menu controls are for the UI rendering but the Providers and DataSources are a bit more confusing.

Perhaps someone can provide a link to a definitive (and clearly written) article?

  • Responsibilities of DataSource vs Provider - good question Commented Nov 19, 2009 at 22:10

1 Answer 1


When you say Navigation Providers I assume you are referring to sitemapproviders. Basically sitemapproviders are code that determine the navigation. I have written quite a few of these to provide better navigation in SharePoint. SiteMapProviders will be asked by the Menu Control through the Datasource different things. The breadcrumb menu control will ask for the current node and then for each node that is returned it asks for the parent node until null is returned. The Top Nav menu control will ask for the root node, and then for each node that is returned, the menu control will ask for it's child nodes until the static or dynamic level is reached. I wrote a blog article about this a few years ago located here. I provide some sample code for writing a sitemapprovider. The code I provided has some issues with it and is not optimized but it can help you get started.

As far as datasources go, that's a typical thing in data bound webcontrols. You can assign the datasource of a control to be a sqldatasource, or a dataset, or in this case it's a sitemapdatasource. It basically converts the sitemapprovider data into something that the menu control can understand.

And yes the menu control just renders the UI. There is a special sharepoint menu control called aspmenu. The source for this control was distributed on the sharepoint blog a few years ago.

I hope all of this makes sense and answers your questions.

  • Thanks for your input Steve. It is interesting to know what the Providers do under the hood. I'll have a read of your article and code. Thanks again. Commented Nov 20, 2009 at 16:42

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.