But here we are not going to discuss about the flat technology thats just enhances the look. Its dynamic, its versatile and it makes programmers life simple. What is that? it is all about Master Pages introduced by Microsoft in ASP .NET 2.0. Microsoft says that Master Pages are a common base file that provides consistent layout across multiple pages in your application. You can have a single Master Page or multiple Master Pages in your application.
Some important points to note
- A master page provides a framework in which the content of each page on a web site is presented. Master pages make it easy to create pages that have a consistent look.
- The pages that provide the content that’s displayed in a master page are called content pages.
- The content of each content page is displayed in the master page’s content placeholder.
- Most events for the content page are raised before the corresponding events for the master page. For example, the Page Load event for the content page is raised before the Page Load event for the master page.
- Similarly, events for controls in the content page are raised before events for controls in the master page.
- Although most master pages have just one content placeholder, you can create more than one content placeholder if you need to. In that case, each placeholder displays a portion of the content of each content page.
- The aspx file for a master page uses the extension .master. The code-behind file uses .master.vb.
- A master page must begin with a Master page directive and should include at least one ContentPlaceHolder control.
- Any HTML or aspx elements that you add to the master page will be displayed on every page that uses the master page along with the ContentPlaceHolder control
- Most master pages include elements like banners and navigation controls.
- It’s common to use tables to provide the layout for the elements on the master page, including the content placeholder.
No comments:
Post a Comment