Working with Master Pages and Themes in ASP.NET 2.0 (
Page 1 of 4 )
You've heard lots of information about master pages and themes in ASP.NET 2.0. Combining these two powerful ASP.NET 2.0 features with a content page produces output that's definitely simpler to work with than defining each page separately. But how do they
Two of the new features in ASP.NET are master pages and themes. A master page lets you design common elements for a Web site and place them in one location. All you need to worry about after that is the details. A theme also reduces development time, by letting you place all of the visual details in one location. For example, if you want to use a green background for your Web pages, you define it in just one place: the theme.
However, to say these features are actually new isn't correct: Microsoft borrowed them. FrontPage has had master pages and themes for a while, now. Therefore, while this is a new addition for ASP.NET 2.0, the technology itself isn't new and is already well tested.
ADVERTISEMENT
Building a Basic Page
A master page, theme, and content page combine to create a single output page. The code you create in each file contributes to a result in HTML.
In many cases, you begin by creating a master page; it provides the structure required by the other two elements to present content and configure the output. To create a master page, right click the project entry in Solution Explorer and choose Add New Item from the context menu. You'll see the Master Page listed as one of the items you can add to a project, as shown in Figure 1.