Master pages - Roskilde Handelsskole

Download Report

Transcript Master pages - Roskilde Handelsskole

ASP.NET
Master pages
Creating a consistent page layout
ASP.NET Master pages
1
Master pages and content pages
ASP.NET Master pages
2
Master pages
• Master pages define the general layout of
the pages in a web site
– Header, including company logo?
– Menu
– Footer
• Master pages leaves one (or more)
content pages placeholders (“holes”) to be
filled you by the content pages
ASP.NET Master pages
3
Content pages
• Content pages fill you the “holes” in the
master page
• Content pages declare which master page
they want to use, if any
• The web server combines the master page
+ content page to form some HTML + CSS
to send back to the client
• Visual Studio can help you link content
pages to a master page
ASP.NET Master pages
4
Further readings
• Spaanjaars Beginning ASP.NET 4 in C# and VB, Wrox
2010
– Chapter 6 Creating Consistent Looking Web Sites,
page 197-207
• Shepherd Microsoft ASP.NET 4 Step by Step, Microsoft
Presss 2010
– Chapter 7 A Consistent Look and Feel, page 143-155
• Evjen Professional ASP.NET 4 in C# and VB, Wrox 2010
– Chapter 5 Working with Master Pages, page 187-216
• MSDN Master Pages
– http://msdn.microsoft.com/en-us/library/wtxbf3hh.aspx
ASP.NET Master pages
5