O'Reilly logo

Learning ASP.NET 2.0 with AJAX by Dan Hurwitz, Jesse Liberty, Brian MacDonald

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

Navigation

The front page of your site is looking pretty good. Users can identify themselves, and see the custom content. The master page is working as planned, and each page identifies itself appropriately. The next thing to do is add some navigation tools so that users can find their way around, which means you have to create a site map. Close the browser if it is open, and select Website → Add New Item, and choose Site Map. Accept the default name of Web.sitemap.

As you learned in Chapter 6, the site map is an XML file, and you have to create it manually—the IDE won't do it for you. Open the web.sitemap file, and replace the default boilerplate with the highlighted code in Example 10-7.

If you log in as a member of the Manager role, you'll see the manager-specific information.

Figure 10-5. If you log in as a member of the Manager role, you'll see the manager-specific information.

Example 10-7. Web.sitemap

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    <siteMapNode title="Root" >
        <siteMapNode url="~/Home.aspx" title="Home" description="Home page" />
        <siteMapNode url="~/Products.aspx" title="Products"
            description="Products offered by AdventureWorks" />
        <siteMapNode url="~/Cart.aspx" title="Shopping Cart"
            description="Items selected for purchase" />
        <siteMapNode url="~/Purchase.aspx" title="Purchase"
            description="Purchase your selected items" />
    </siteMapNode>
</siteMap>

Now that you have the site map file, you'll ...

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