Home > Microsoft .Net Development Tips > ASP.NET Development > Master Pages in ASP.NET 2.0 drive uniform design
Win Development Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ASP.NET DEVELOPMENT

Master Pages in ASP.NET 2.0 drive uniform design


Brian Eastwood, Associate Editor
01.30.2006
Rating: --- (out of 5)


.NET Essentials Channel
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


ASP.NET 2.0 offers many well-documented enhancements, from security controls and site administration tools to, of course, code reductions. For anyone building a complex Web application for customers or employees, the most notable improvements can be found in the page framework. Here Microsoft has gone to great lengths to ensure that developers need to build something once and only once.

The Master Page construction aptly reflects this notion. A master page consists of common content, such as the banner across the top of a Web application, and a spot for content placeholders. (Content pages, conversely, reference master pages and fill the placeholders.)

"User interface design is left to the designers," said Patrick Hynds, CTO, CriticalSites, during a demo at Microsoft Launch event in Boston. "It's not something we have to wrap our minds around every day."

As outlined in the MSDN article Master Pages in ASP.NET 2.0, content pages have the same .aspx extension as typical ASP.NET files.
More on ASP.NET 2.0 development

ASP.NET 2.0 Learning Guide

ASP.NET 2.0 provides cleaner, developer-friendly coding

How to Use Master Pages -- Chapter 3 of Murach's ASP.NET 2.0 Upgrader's Guide, VB Edition

There are a couple differences, though. Everything on a content page needs to be contained within Content controls, which map content areas on the pages to the appropriate areas marked by a master page's ContentPlaceHolder control. In addition, a content page has to be associated with a Master Page through an attribute of the <%@ Page %> directive.

Content development gains a few timesavers, too, as Tony Pino of the Boston .NET User Group demonstrated when the group met in January. The easiest way to control and update an app, Pino said, is through themes.

Themes consist of a style sheet, images and a skin file, which defines styles for a specific server control (like the width of a text box) but does not affect the overall design of a Web app. Skins work well for defining advanced controls and collections and for displaying foreground images that can't be controlled by cascading style sheets, as Jeff King explained at Tech Ed.

Themes can be defined on a per-page basis, and a developer can always override a page's theme, Pino said. Also keep in mind that themes should not include global images or style sheets such as Print or Shared.

This MSDN article by Stephen Walther, Creating Web Application Themes in ASP.NET 2.0, offers more insight into constructing themes, deploying skins and incorporating both into cascading style sheets.

Rate this Tip
To rate tips, you must be a member of SearchWinDevelopment.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
ASP.NET Development
How to use jQuery to solve Javascript browser compatibility problems
How to write an out-of-browser Silverlight 3 application in 3 steps
Silverlight 3 beta SDK download lets developers try new RIA features
Visual Studio's IntelliSense for jQuery doesn't autocomplete correctly
Dundas Map for .NET kicks up geographic visualization
Return to CodePlex: Into the Sandcastle…
VBScript Tutorial
Use PHP with Visual Studio to create Web sites
Visual Studio Team System Add-ins: Conchango Scrum for Team System and Scrum Dashboard
Visual Studio 2008 and .NET Framework 3.5 SP1 introduces ADO .NET Entity Designer

ASP.NET development best practices
Introduction to ASP.NET's Model View Controller (MVC) Design Pattern
Silverlight, Ajax components require different approach to UI
LINQ Learning Guide: LINQ and Web applications
VB code download home page
VB code: File manipulation downloads
Localization practices for .NET 2.0: It's still about the architecture
Creating custom ASP.NET 2.0 profile providers
.NET development in the trenches
Microsoft developers balancing age-old issues, barrage of new technology
SearchVB.com's Podcast Page

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
136 browser colors with names  (SearchWinDevelopment.com)
ASP.NET  (SearchWinDevelopment.com)
browser  (SearchWinDevelopment.com)
Document Object Model  (SearchWinDevelopment.com)
domain name  (SearchWinDevelopment.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Database Programming Solutions - .NET XML, Visual Studio LINQ, ORM .NET
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts