Brief introduction
A common feature of user-friendly web sites is that they have consistent site-level page layout and navigation patterns. ASP.net 2.0 introduces two new features that greatly simplify the process of site-level page layout and navigation mode implementation. These two features are: Master pages and site navigation. The master page allows developers to create a site-level template with the specified editable region. The template can then be applied to the ASP.net page in the Web site. These asp.net pages simply provide the appropriate content for the editable regions specified in the master page – all the other tags in the master page are the same on all asp.net pages that use the master page. This model allows developers to define and centrally implement site-level page layouts. As a result, developers can easily create a consistent look for all pages and make easy updates.
The site navigation system provides a mechanism for Web page developers to define site maps, and also provides APIs that allow developers to programmatically query the site map. With the new navigation Web controls (Menu, TreeView, and SiteMapPath), developers can easily render all or part of the site map in plain navigation user interface elements. In this tutorial, we will use the default site navigation provider, that is, our site map will be defined in XML-formatted files.
To illustrate these concepts and improve usability of the tutorial Web site, in this tutorial we will define a site-level page layout that implements the site map and adds a navigation UI. At the end of this tutorial, we will have a comprehensive web design program to build the tutorial pages.
Figure 1: Web site completed at the end of the tutorial
Step 1: Create a master Page
The first step is to create a master page for the site. At this point, our site contains only the following: Typed DataSet (Northwind.xsd, in the App_Code folder), BLL class (Productsbll.vb, Categoriesbll.vb, and so on in the App_Code folder) , the database (Northwnd.mdf, in the App_Data folder), the configuration file (Web.config), and a CSS style sheet file (styles.css). I removed the pages and files that were presented with the DAL and BLL from the first two tutorials, as we'll go through the examples in a later tutorial.
Figure 2: The files in this project