Creating the SqlSiteMapProvider
For certain applications it makes more sense to store a Site Map in a database table than an XML file. In this section, you can see the creation of the SqlSiteMapProvider
, which stores a Site Map in a Microsoft SQL Server database.
To use the SqlSiteMapProvider
class, you must create a SQL database table named SiteMap. Furthermore, the SiteMap database table must look like this:
Each row in the SiteMap table represents a particular Site Map node. The relationship between the nodes is represented by the ParentId column. The row that represents the root node has a ParentId column with the value null. Every other ...
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.