Download presentation
Presentation is loading. Please wait.
Published byGavin Gardner Modified over 9 years ago
1
Master Pages MacDonald Ch. 13 MIS 324 MIS 324 Professor Sandvig Professor Sandvig
2
Outline 1. Why Master Pages? 2. Syntax 3. Example
3
Benefits of Master Pages Create a template for site layout Defined in one place, rather than each page Defined in one place, rather than each page Include “Placeholders” for page-specific content Individual pages inherit layout from master Eliminates last place where code was duplicated
4
Syntax Create master page.master extension.master extension Directive: Directive: Include common content Include common content headers, footers, menus, layout, etc.headers, footers, menus, layout, etc. Include placeholder controls for page content Include placeholder controls for page content
5
Syntax .aspx pages Reference master page in page directive Reference master page in page directive Include “content” controls Include “content” controls Provides contentProvides content Map to placeholders in.master pageMap to placeholders in.master page
6
VS Support
8
Syntax Default Content Include in master page Include in master page Used when.aspx page does not provide content. Used when.aspx page does not provide content. Example: Example: Florist: default.aspxFlorist: default.aspxdefault.aspx Source: masterPage.master.txt, daisy.aspx.txtSource: masterPage.master.txt, daisy.aspx.txtmasterPage.master.txtdaisy.aspx.txtmasterPage.master.txtdaisy.aspx.txt
9
MasterPages: Other Features Nesting Sub-masters inherit from.master Sub-masters inherit from.master Add more placeholders Add more placeholders Programmatic access to master page Change items from.aspx page Change items from.aspx page meta tagsmeta tags style sheet …style sheet … Navigation Controls Extensive integration with MasterPages Extensive integration with MasterPages Page titles, formatting, etc.Page titles, formatting, etc. Example: ISC web site ISC
10
Summary Master Pages Handy new feature Handy new feature Easy to use Easy to use
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.