Paul Wilson
Microsoft's most valuable expert in the ASP.NET field
October 2003
Applicable to:
Microsoft ASP.NET whidbey
Microsoft Visual Basic .NET
Summary: Understand the master page characteristics, this is a flexible page template system that appears in the ASP.NET version of the world, providing excellent visual designer support, its code "whidbey" (according to the upcoming Microsoft Visual The code named after the Studio .NET released. (10 page print pages)
Download the ASP.NET PRO example.
content
This page
Advantages of multi-region and header tags nested and dynamic master
Note The corresponding software product is officially issued, this document has been written, so we cannot guarantee that any details involved in this document are exactly the same as the final delivery. Description Information in this article is for use in this article, for reference only in planning. If there is any change, no notice.
Most web sites share a layout, but traditional ASP and ASP.NET have never included automatic support for page templates. Although the contained files are usually used in the traditional ASP, and the user controls and basic PAGE classes are often used, but these methods are not built-in and do not have designer support. Microsoft ASP.NET Whidbey changes this situation by joining a flexible page template system named masterpiece. This template system should be simple enough to designer, and its function is strong enough for developers.
To learn this new master page method, the easiest way is to examine some examples, so the remainder of this article will tell you a number of examples, from the simplest case, gradually extend to a higher level.
The first example creates a master with site headings, left and right sidebars, site footnotes, and single content "areas" to illustrate various new concepts and syntax of the master page. First, create a master page as a common layout. The master page is very similar to the user control, and the difference is that it has a new Master file extension and an Master directive. Unlike most user controls, the master page will contain top HTML tags typically located in each individual page, such as ,
, , and