A1: | Actually, ASP.NET allows for developers to specify their own site map formats. You can create your own site map provider that would allow for a different mechanism for storing the site map information. A site map provider is a class that you would write to instruct ASP.NET on how to retrieve site map information. The default site map provider uses an XML file with the format we examined in this hour; however, there's no reason why you couldn't create your own provider. A discussion on creating and working with custom providers is beyond the scope of this book. If you are interested in learning more, though, be sure to check out the articles at http://msdn.microsoft.com/library/en-us/dnaspp/html/extndsitenv.asp and http://msdn.microsoft.com/library/en-us/dnaspp/html/custsitemap.asp. |
A2: | When creating a website, typically we want all pages to have a similar look and feel, such as all pages having a menu across the top. A naïve way to accomplish this is to simply repeat the desired look and feel on each page. This approach, though, is asking for trouble, because if we decide to update our site's look, we then need to make changes to each and every page in the site! A better approach is to use master pages. Master pages allow us to create a single page that specifies a standard look and feel. For example, the master page may contain a menu along the top and a list of common links at the bottom of the page. Then, when creating a new page, we can specify that it use the master page. The result is that all pages that use the master page will have a consistent look and feel. Furthermore, any changes to the master page are immediately reflected on those pages that use that master page, thereby making updating the site's appearance as easy as editing the master page. We'll examine master pages in depth in Hour 21, "Using Master Pages to Provide Sitewide Page Templates." |