SlideShare a Scribd company logo
1 of 16
BY-Teach4u.in
Master pages
Master page defines a combination of fixed content
and content place holder to hold the web page(.aspx)
Master Page
An ASP.NET file with a .master file extension. A
master page contains a layout that includes text,
HTML, and server controls. Instead of an “@ Page”
directive, it contains an “@ Master” directive. The
master page contains all top-level HTML elements for a
page, including <html>, <head>, and <form>. A master
page typically includes the page structure (usually an
HTML table), company name and logo, and site
navigation. To enable pages to insert content, a master
page contains one or more ContentPlaceHolder
controls. A master page inherits from the MasterPage
class.
Content Page
A content page defines the ContentPlaceHolder
controls in a master page, essentially filling in the
blanks. A content page is a standard .aspx file and is
bound to the master page using the MasterPageFile
attribute in the “@ Page” directive.
Master pages provide templates that you can use to
create consistent Web pages throughout an
application.
continued
To use master pages, first create a master page and
add layout tables and other common elements. Then
add ContentPlaceHolder controls to the master page.
To create the content pages, add standard Web forms,
select the master page check box when creating the
page, select the master page, and then add content to
the page.
Master pages
To reference public properties in a master page, add
the “@ MasterType” declaration to the content page
and reference the property using
Master.Property_Name. To reference controls in a
master page, call Master.FindControl from the content
page.
Master pages
ASP.NET master pages allow you to create a consistent layout for the
pages in your application. A single master page defines the look and
feel and standard behavior that you want for all of the pages (or a
group of pages) in your application. You can then create individual
content pages that contain the content you want to display. When
users request the content pages, they merge with the master page to
produce output that combines the layout of the master page with the
content from the content page.
How master page works
A master page is an ASP.NET file with the extension
.master (for example, MySite.master) with a predefined
layout that can include static text, HTML elements, and
server controls. The master page is identified by a
special @ Master directive that replaces the @ Page
directive that is used for ordinary .aspx pages. The
directive looks like the following.
 <%@ Master Language="C#" CodeFile="MasterPage.master.cs"
Inherits="MasterPage" %>
Content page
You define the content for the master page's
placeholder controls by creating individual content
pages, which are ASP.NET pages (.aspx files and,
optionally, code-behind files) that are bound to a
specific master page. The binding is established in the
content page's @ Page directive by including a
MasterPageFile attribute that points to the master
page to be used. For example, a content page might
have the following @ Page directive, which binds it to
the Master1.master page.
<%@ Page Language="C#"
MasterPageFile="~/MasterPages/Master1.master" Title="Content
Page"%>
Replaceable content placeholder control
 These placeholder controls define regions where replaceable content will appear.
 <%@ Master Language="C#" %>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" >
 <head runat="server" >
 <title>Master page title</title>
 </head>
 <body>
 <form id="form1" runat="server">
 <table>
 <tr>
 <td><asp:contentplaceholder id="Main" runat="server" /></td>
 <td><asp:contentplaceholder id="Footer" runat="server" /></td>
 </tr>
 </table>
 </form>
 </body>
 </html>
Content page
Advantages of master pages
They allow you to centralize the common functionality of
your pages so that you can make updates in just one place.
They make it easy to create one set of controls and code
and apply the results to a set of pages. For example, you
can use controls on the master page to create a menu that
applies to all pages.
They give you fine-grained control over the layout of the
final page by allowing you to control how the placeholder
controls are rendered.
They provide an object model that allows you to
customize the master page from individual content pages.
Run time behaviour of the master page
At run time, master pages are handled in the following sequence:
1.Users request a page by typing the URL of the content page.
2.When the page is fetched, the @ Page directive is read. If the
directive references a master page, the master page is read as well.
If this is the first time the pages have been requested, both pages
are compiled.
3.The master page with the updated content is merged into the
control tree of the content page.
4.The content of individual Content controls is merged into the
corresponding ContentPlaceHolder control in the master page.
5.The resulting merged page is rendered to the browser
Run time behaviour of the master page
Themes and skin files
Themes are a feature similar to style sheets as they
help to supply a standard look and feel to web
controls. You can use CSS style sheets to supply styles
to HTML elements but if you wanted to use a set of
predefined styling attributes to your web controls
then you should use a Theme.


More Related Content

What's hot (20)

Javascript
JavascriptJavascript
Javascript
 
Css Ppt
Css PptCss Ppt
Css Ppt
 
Ajax ppt
Ajax pptAjax ppt
Ajax ppt
 
Master page in Asp.net
Master page in Asp.netMaster page in Asp.net
Master page in Asp.net
 
Web controls
Web controlsWeb controls
Web controls
 
ASP.NET 07 - Site Navigation
ASP.NET 07 - Site NavigationASP.NET 07 - Site Navigation
ASP.NET 07 - Site Navigation
 
Ajax ppt - 32 slides
Ajax ppt - 32 slidesAjax ppt - 32 slides
Ajax ppt - 32 slides
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
Server Side Programming
Server Side ProgrammingServer Side Programming
Server Side Programming
 
Event In JavaScript
Event In JavaScriptEvent In JavaScript
Event In JavaScript
 
Css pseudo-classes
Css pseudo-classesCss pseudo-classes
Css pseudo-classes
 
CSS
CSSCSS
CSS
 
Data types in php
Data types in phpData types in php
Data types in php
 
Introduction to HTML5 Canvas
Introduction to HTML5 CanvasIntroduction to HTML5 Canvas
Introduction to HTML5 Canvas
 
GRID VIEW PPT
GRID VIEW PPTGRID VIEW PPT
GRID VIEW PPT
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.Net
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
Datasource in asp.net
Datasource in asp.netDatasource in asp.net
Datasource in asp.net
 
ASP.NET State management
ASP.NET State managementASP.NET State management
ASP.NET State management
 

Viewers also liked

Master pages ppt
Master pages pptMaster pages ppt
Master pages pptIblesoft
 
Master Pages In Asp.net
Master Pages In Asp.netMaster Pages In Asp.net
Master Pages In Asp.netparallelminder
 
Asp.Net 2.0 Presentation
Asp.Net 2.0 PresentationAsp.Net 2.0 Presentation
Asp.Net 2.0 Presentationsasidhar
 
Formbased authentication in asp.net
Formbased authentication in asp.netFormbased authentication in asp.net
Formbased authentication in asp.netparallelminder
 
Nevigation control in asp.net
Nevigation control in asp.netNevigation control in asp.net
Nevigation control in asp.netparallelminder
 
Restoring SharePoint Frontend server
Restoring SharePoint Frontend serverRestoring SharePoint Frontend server
Restoring SharePoint Frontend serverparallelminder
 
Difference between authentication and authorization in asp.net
Difference between authentication and authorization in asp.netDifference between authentication and authorization in asp.net
Difference between authentication and authorization in asp.netUmar Ali
 
State management
State managementState management
State managementteach4uin
 
Authentication and Authorization in Asp.Net
Authentication and Authorization in Asp.NetAuthentication and Authorization in Asp.Net
Authentication and Authorization in Asp.NetShivanand Arur
 
Toc(df avs nfa)avishek130650107020
Toc(df avs nfa)avishek130650107020Toc(df avs nfa)avishek130650107020
Toc(df avs nfa)avishek130650107020Avishek Sarkar
 
Presentación softeng agile-eu gimbernat
Presentación softeng  agile-eu gimbernatPresentación softeng  agile-eu gimbernat
Presentación softeng agile-eu gimbernatMICProductivity
 
Windows Presentation Foundation
Windows Presentation Foundation  Windows Presentation Foundation
Windows Presentation Foundation Deepika Chaudhary
 
Developing Multi-tenant provider hosted apps: From Idea to Office Store
Developing Multi-tenant provider hosted apps: From Idea to Office StoreDeveloping Multi-tenant provider hosted apps: From Idea to Office Store
Developing Multi-tenant provider hosted apps: From Idea to Office StoreBiserka Cvetkovska
 
EUGM15 - Zoltán Simon (Printnet): Drug Profile Matching - Drug Discovery by P...
EUGM15 - Zoltán Simon (Printnet): Drug Profile Matching - Drug Discovery by P...EUGM15 - Zoltán Simon (Printnet): Drug Profile Matching - Drug Discovery by P...
EUGM15 - Zoltán Simon (Printnet): Drug Profile Matching - Drug Discovery by P...ChemAxon
 

Viewers also liked (20)

Master pages ppt
Master pages pptMaster pages ppt
Master pages ppt
 
Master Pages In Asp.net
Master Pages In Asp.netMaster Pages In Asp.net
Master Pages In Asp.net
 
Master page in ASP . NET
Master page in ASP . NETMaster page in ASP . NET
Master page in ASP . NET
 
Asp.Net 2.0 Presentation
Asp.Net 2.0 PresentationAsp.Net 2.0 Presentation
Asp.Net 2.0 Presentation
 
ASP.NET Lecture 3
ASP.NET Lecture 3ASP.NET Lecture 3
ASP.NET Lecture 3
 
ADO.NET
ADO.NETADO.NET
ADO.NET
 
Formbased authentication in asp.net
Formbased authentication in asp.netFormbased authentication in asp.net
Formbased authentication in asp.net
 
Nevigation control in asp.net
Nevigation control in asp.netNevigation control in asp.net
Nevigation control in asp.net
 
Restoring SharePoint Frontend server
Restoring SharePoint Frontend serverRestoring SharePoint Frontend server
Restoring SharePoint Frontend server
 
Difference between authentication and authorization in asp.net
Difference between authentication and authorization in asp.netDifference between authentication and authorization in asp.net
Difference between authentication and authorization in asp.net
 
Master page in asp.net
Master page in asp.netMaster page in asp.net
Master page in asp.net
 
State management
State managementState management
State management
 
Authentication and Authorization in Asp.Net
Authentication and Authorization in Asp.NetAuthentication and Authorization in Asp.Net
Authentication and Authorization in Asp.Net
 
Toc(df avs nfa)avishek130650107020
Toc(df avs nfa)avishek130650107020Toc(df avs nfa)avishek130650107020
Toc(df avs nfa)avishek130650107020
 
JSP Custom Tags
JSP Custom TagsJSP Custom Tags
JSP Custom Tags
 
WCF
WCFWCF
WCF
 
Presentación softeng agile-eu gimbernat
Presentación softeng  agile-eu gimbernatPresentación softeng  agile-eu gimbernat
Presentación softeng agile-eu gimbernat
 
Windows Presentation Foundation
Windows Presentation Foundation  Windows Presentation Foundation
Windows Presentation Foundation
 
Developing Multi-tenant provider hosted apps: From Idea to Office Store
Developing Multi-tenant provider hosted apps: From Idea to Office StoreDeveloping Multi-tenant provider hosted apps: From Idea to Office Store
Developing Multi-tenant provider hosted apps: From Idea to Office Store
 
EUGM15 - Zoltán Simon (Printnet): Drug Profile Matching - Drug Discovery by P...
EUGM15 - Zoltán Simon (Printnet): Drug Profile Matching - Drug Discovery by P...EUGM15 - Zoltán Simon (Printnet): Drug Profile Matching - Drug Discovery by P...
EUGM15 - Zoltán Simon (Printnet): Drug Profile Matching - Drug Discovery by P...
 

Similar to Master pages

ASP.NET 06 - Customizing Your Sites Appearance
ASP.NET 06 - Customizing Your Sites AppearanceASP.NET 06 - Customizing Your Sites Appearance
ASP.NET 06 - Customizing Your Sites AppearanceRandy Connolly
 
04 asp.net session05
04 asp.net session0504 asp.net session05
04 asp.net session05Vivek chan
 
Aspnet master pages_tutorial_10_cs
Aspnet master pages_tutorial_10_csAspnet master pages_tutorial_10_cs
Aspnet master pages_tutorial_10_csVaibhav Chavan
 
11 asp.net session16
11 asp.net session1611 asp.net session16
11 asp.net session16Vivek chan
 
04 asp.net session05
04 asp.net session0504 asp.net session05
04 asp.net session05Mani Chaubey
 
Customizing the Appearance and HTML Output of Visualforce Pages
Customizing the Appearance and HTML Output of VisualforcePages Customizing the Appearance and HTML Output of VisualforcePages
Customizing the Appearance and HTML Output of Visualforce Pages Mohammed Safwat Abu Kwaik
 
04 asp.net session05
04 asp.net session0504 asp.net session05
04 asp.net session05Niit Care
 
Asp.net web page syntax overview
Asp.net web page syntax overviewAsp.net web page syntax overview
Asp.net web page syntax overviewSalam Khan
 
Advanced SharePoint 2013 Site Administration
Advanced SharePoint 2013 Site AdministrationAdvanced SharePoint 2013 Site Administration
Advanced SharePoint 2013 Site AdministrationLearning SharePoint
 
Master Pages And Navigation
Master Pages And NavigationMaster Pages And Navigation
Master Pages And NavigationAlfredo Cancino
 
Overview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company indiaOverview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company indiaJignesh Aakoliya
 
3) web development
3) web development3) web development
3) web developmenttechbed
 
Blooming SharePoint Design
Blooming SharePoint DesignBlooming SharePoint Design
Blooming SharePoint DesignKathy Hughes
 

Similar to Master pages (20)

Master pages
Master pagesMaster pages
Master pages
 
masterpages 1.pptx
masterpages 1.pptxmasterpages 1.pptx
masterpages 1.pptx
 
Master page
Master pageMaster page
Master page
 
ASP.NET 06 - Customizing Your Sites Appearance
ASP.NET 06 - Customizing Your Sites AppearanceASP.NET 06 - Customizing Your Sites Appearance
ASP.NET 06 - Customizing Your Sites Appearance
 
04 asp.net session05
04 asp.net session0504 asp.net session05
04 asp.net session05
 
Aspnet master pages_tutorial_10_cs
Aspnet master pages_tutorial_10_csAspnet master pages_tutorial_10_cs
Aspnet master pages_tutorial_10_cs
 
Chapter 5 (master page)
Chapter 5 (master page)Chapter 5 (master page)
Chapter 5 (master page)
 
Chapter 12
Chapter 12Chapter 12
Chapter 12
 
11 asp.net session16
11 asp.net session1611 asp.net session16
11 asp.net session16
 
04 asp.net session05
04 asp.net session0504 asp.net session05
04 asp.net session05
 
Customizing the Appearance and HTML Output of Visualforce Pages
Customizing the Appearance and HTML Output of VisualforcePages Customizing the Appearance and HTML Output of VisualforcePages
Customizing the Appearance and HTML Output of Visualforce Pages
 
04 asp.net session05
04 asp.net session0504 asp.net session05
04 asp.net session05
 
Intro to OctoberCMS
Intro to OctoberCMSIntro to OctoberCMS
Intro to OctoberCMS
 
Lecture11
Lecture11Lecture11
Lecture11
 
Asp.net web page syntax overview
Asp.net web page syntax overviewAsp.net web page syntax overview
Asp.net web page syntax overview
 
Advanced SharePoint 2013 Site Administration
Advanced SharePoint 2013 Site AdministrationAdvanced SharePoint 2013 Site Administration
Advanced SharePoint 2013 Site Administration
 
Master Pages And Navigation
Master Pages And NavigationMaster Pages And Navigation
Master Pages And Navigation
 
Overview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company indiaOverview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company india
 
3) web development
3) web development3) web development
3) web development
 
Blooming SharePoint Design
Blooming SharePoint DesignBlooming SharePoint Design
Blooming SharePoint Design
 

More from teach4uin

.Net framework
.Net framework.Net framework
.Net frameworkteach4uin
 
Scripting languages
Scripting languagesScripting languages
Scripting languagesteach4uin
 
security configuration
security configurationsecurity configuration
security configurationteach4uin
 
static dynamic html tags
 static dynamic html tags static dynamic html tags
static dynamic html tagsteach4uin
 
static dynamic html tags
static dynamic html tagsstatic dynamic html tags
static dynamic html tagsteach4uin
 
New microsoft office power point presentation
New microsoft office power point presentationNew microsoft office power point presentation
New microsoft office power point presentationteach4uin
 
.Net overview
.Net overview.Net overview
.Net overviewteach4uin
 
Stdlib functions lesson
Stdlib functions lessonStdlib functions lesson
Stdlib functions lessonteach4uin
 
storage clas
storage classtorage clas
storage clasteach4uin
 
Cprogrammingprogramcontrols
CprogrammingprogramcontrolsCprogrammingprogramcontrols
Cprogrammingprogramcontrolsteach4uin
 
Cprogrammingoperator
CprogrammingoperatorCprogrammingoperator
Cprogrammingoperatorteach4uin
 

More from teach4uin (20)

Controls
ControlsControls
Controls
 
validation
validationvalidation
validation
 
validation
validationvalidation
validation
 
.Net framework
.Net framework.Net framework
.Net framework
 
Scripting languages
Scripting languagesScripting languages
Scripting languages
 
Css1
Css1Css1
Css1
 
Code model
Code modelCode model
Code model
 
Asp db
Asp dbAsp db
Asp db
 
security configuration
security configurationsecurity configuration
security configuration
 
static dynamic html tags
 static dynamic html tags static dynamic html tags
static dynamic html tags
 
static dynamic html tags
static dynamic html tagsstatic dynamic html tags
static dynamic html tags
 
New microsoft office power point presentation
New microsoft office power point presentationNew microsoft office power point presentation
New microsoft office power point presentation
 
.Net overview
.Net overview.Net overview
.Net overview
 
Stdlib functions lesson
Stdlib functions lessonStdlib functions lesson
Stdlib functions lesson
 
enums
enumsenums
enums
 
memory
memorymemory
memory
 
array
arrayarray
array
 
storage clas
storage classtorage clas
storage clas
 
Cprogrammingprogramcontrols
CprogrammingprogramcontrolsCprogrammingprogramcontrols
Cprogrammingprogramcontrols
 
Cprogrammingoperator
CprogrammingoperatorCprogrammingoperator
Cprogrammingoperator
 

Recently uploaded

Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 

Recently uploaded (20)

Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 

Master pages

  • 2. Master pages Master page defines a combination of fixed content and content place holder to hold the web page(.aspx)
  • 3. Master Page An ASP.NET file with a .master file extension. A master page contains a layout that includes text, HTML, and server controls. Instead of an “@ Page” directive, it contains an “@ Master” directive. The master page contains all top-level HTML elements for a page, including <html>, <head>, and <form>. A master page typically includes the page structure (usually an HTML table), company name and logo, and site navigation. To enable pages to insert content, a master page contains one or more ContentPlaceHolder controls. A master page inherits from the MasterPage class.
  • 4. Content Page A content page defines the ContentPlaceHolder controls in a master page, essentially filling in the blanks. A content page is a standard .aspx file and is bound to the master page using the MasterPageFile attribute in the “@ Page” directive. Master pages provide templates that you can use to create consistent Web pages throughout an application.
  • 5. continued To use master pages, first create a master page and add layout tables and other common elements. Then add ContentPlaceHolder controls to the master page. To create the content pages, add standard Web forms, select the master page check box when creating the page, select the master page, and then add content to the page.
  • 6. Master pages To reference public properties in a master page, add the “@ MasterType” declaration to the content page and reference the property using Master.Property_Name. To reference controls in a master page, call Master.FindControl from the content page.
  • 7.
  • 8. Master pages ASP.NET master pages allow you to create a consistent layout for the pages in your application. A single master page defines the look and feel and standard behavior that you want for all of the pages (or a group of pages) in your application. You can then create individual content pages that contain the content you want to display. When users request the content pages, they merge with the master page to produce output that combines the layout of the master page with the content from the content page.
  • 9. How master page works A master page is an ASP.NET file with the extension .master (for example, MySite.master) with a predefined layout that can include static text, HTML elements, and server controls. The master page is identified by a special @ Master directive that replaces the @ Page directive that is used for ordinary .aspx pages. The directive looks like the following.  <%@ Master Language="C#" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
  • 10. Content page You define the content for the master page's placeholder controls by creating individual content pages, which are ASP.NET pages (.aspx files and, optionally, code-behind files) that are bound to a specific master page. The binding is established in the content page's @ Page directive by including a MasterPageFile attribute that points to the master page to be used. For example, a content page might have the following @ Page directive, which binds it to the Master1.master page. <%@ Page Language="C#" MasterPageFile="~/MasterPages/Master1.master" Title="Content Page"%>
  • 11. Replaceable content placeholder control  These placeholder controls define regions where replaceable content will appear.  <%@ Master Language="C#" %>  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML  1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">  <html xmlns="http://www.w3.org/1999/xhtml" >  <head runat="server" >  <title>Master page title</title>  </head>  <body>  <form id="form1" runat="server">  <table>  <tr>  <td><asp:contentplaceholder id="Main" runat="server" /></td>  <td><asp:contentplaceholder id="Footer" runat="server" /></td>  </tr>  </table>  </form>  </body>  </html>
  • 13. Advantages of master pages They allow you to centralize the common functionality of your pages so that you can make updates in just one place. They make it easy to create one set of controls and code and apply the results to a set of pages. For example, you can use controls on the master page to create a menu that applies to all pages. They give you fine-grained control over the layout of the final page by allowing you to control how the placeholder controls are rendered. They provide an object model that allows you to customize the master page from individual content pages.
  • 14. Run time behaviour of the master page At run time, master pages are handled in the following sequence: 1.Users request a page by typing the URL of the content page. 2.When the page is fetched, the @ Page directive is read. If the directive references a master page, the master page is read as well. If this is the first time the pages have been requested, both pages are compiled. 3.The master page with the updated content is merged into the control tree of the content page. 4.The content of individual Content controls is merged into the corresponding ContentPlaceHolder control in the master page. 5.The resulting merged page is rendered to the browser
  • 15. Run time behaviour of the master page
  • 16. Themes and skin files Themes are a feature similar to style sheets as they help to supply a standard look and feel to web controls. You can use CSS style sheets to supply styles to HTML elements but if you wanted to use a set of predefined styling attributes to your web controls then you should use a Theme. 

Editor's Notes

  1. With most web sites, only part of the page changes when you go from one page to another. The parts that don’t change usually include common regions like the header, a menu, and the footer. To create web pages with a consistent layout you need a way to define these relatively static regions in a single template file.
  2. Master pages defines a combination of fixed content and contentPlace holders which are filled by individual web pages.
  3. Themes are contained in a special ASP.NET folder called App_Themes and each Theme you want to add in your web application should reside in a separate folder under this App_Themes folder. Let’s say you want to create a Theme called Dallas for the visitors that are coming from Dallas then you can create a DallasTheme folder under App_Themes folder to represent this Theme. In this folder you need to create a skin file. A skin file a file in which you describe the visual styles that are used by pages that will use this Theme. The name if the skin file is not important but the extension should be .skin. In the skin file you just need to add the exact definitions of the web controls with all the visual attributes you want. You need to add the runat=”server” attribute but beware of adding the ID attribute because that will cause an error. For example I have a skin file with the following contents &amp;lt;asp:TextBox runat=&amp;quot;server&amp;quot; Font-Names=&amp;quot;Verdana&amp;quot; Font-Size=&amp;quot;11px&amp;quot; Width=&amp;quot;200px&amp;quot; BorderStyle=&amp;quot;Solid&amp;quot; BorderColor=&amp;quot;#cc6666&amp;quot; BackColor=&amp;quot;#ffcccc&amp;quot; /&amp;gt; And this file is placed in the App_Themes/DallasTheme folder. Remember that the theme is identified by the theme folder name in this case DallasTheme. After you’ve placed the skin file you need to set a web page to use this Theme. You can enable a Theme for the entire page by setting the Theme attribute of the page equal to the name of the Theme. In this case it would be Now at every place where a Textbox web control is used, it will be rendered with the styles defined in the skin file. If you want to disable the Theme for a specific control you can set its EnableTheming property to false and it won’t get the styles from the skin file and instead you can add your own b specifying attributes. You can also define more than one style for a web control in the skin file by adding the SkinID attribute to the web control definition in the skin file and in the web page that is utilizing the Theme you can set the control’s SkinID equal to the one you want to use from the skin file.