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.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
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.
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.