O'Reilly logo

Applied ASP.NET 4 in Context by Adam Freeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required