Team LiB
Previous Section Next Section

Chapter 4: Working with Master Pages

Overview

The Master Pages functionality goes by many names, one of which is "page templating." All of these expressions have the same meaning. They refer to the central deposit of site layouts, including the navigation, which will then automatically be transferred to single Content Pages. From now on, you have to make changes to the general layout in just one place. Those changes will become effective on all corresponding pages that use the Master Page you changed. Sounds like a standard requirement for approximately 100% of all web sites, don't you agree? Right!

The 1.0 and 1.1 versions of ASP.NET didn't offer the Master Pages functionality. That was a good reason for many developers to implement their own approaches. These approaches went from the static output of HTML tags to the implementation of user controls to the drilling of page life cycles. The latter offered the greatest flexibility and was my favorite too. I have to admit, however, that it wasn't an ideal solution.

With version 2.0, ASP.NET offers its own and fully integrated support for Master Pages for the first time. You develop one or several layouts as Master Pages and allocate them to single Content Pages. In combination with VS .NET, you can now design the Content Pages visually within the Master Pages context and fill one or several defined placeholders.


Team LiB
Previous Section Next Section