Using Control Templates

Some of the built-in Web Forms controls support templates, which you can use to alter the way that they are rendered to HTML. To demonstrate the template feature, we will look at the SiteMapPath control.

To set the baseline, Listing 16-6 shows the Web.sitemap file we will be using, which is the same one that we used in Chapter 15.

Listing 16-6. A simple site map

<?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="~/Main.aspx" title="Triathlon"> <siteMapNode url="~/Data.aspx" title="Race Data"> <siteMapNode url="~/Default.aspx" title="Lastest Data"  description="" /> </siteMapNode> <siteMapNode url="~/People.aspx" title="Athletes"> <siteMapNode ...

Get Applied ASP.NET 4 in Context 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.