Using the SiteMapPath
Control
The SiteMapPath
control enables you to navigate easily to any parent page of the current page. It displays the standard breadcrumb trail that you see on many popular websites (see Figure 22.1).
Figure 22.1. Breadcrumb trail at Yahoo.com.
You can use the SiteMapPath
control simply by declaring the control in a page. The control automatically uses the Web.sitemap
file located in the root of your application. For example, the page in Listing 22.2 includes the SiteMapPath
control (see Figure 22.2).
Figure 22.2. Displaying the SiteMapPath
control.
Listing 22.2. UsingSiteMapPath/DisplaySiteMapPath.aspx
You can ...
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.