Creating the AutoSiteMapProvider
All Site Map providers inherit from the base SiteMapProvider
class. If you want to create your own Site Map provider, you can override the methods of this base class.
However, in most cases it makes more sense to derive a custom Site Map provider from the base StaticSiteMapProvider
class. This is the base class for the default Site Map provider—the XmlSiteMapProvider
—and this class includes default implementations of many of the SiteMapProvider
methods.
This AutoSiteMapProvider
derives from the StaticSiteMapProvider
class. It overrides two methods of the base class: GetRootNodeCore()
and BuildSiteMap()
.
The GetRootNodeCore()
method returns the root node of the Site Map. The BuildSiteMap()
method is the method ...
Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.