When you build a Web application, it usually has a similar look-and-feel across all its pages. Not too many applications are designed with each page dramatically different from the next. Generally, for your applications, you use similar fonts, colors, and server control styles across all the pages.
You can apply these common styles individually to each and every server control or object on each page, or you can use a capability provided by ASP.NET 3.5 to centrally specify these styles. All pages or parts of pages in the application can then access them.
Themes are the text-based style definitions in ASP.NET 3.5 that are the focus of this chapter.
Themes are similar to Cascading Style Sheets (CSS) in that they enable you to define visual styles for your Web pages. Themes go further than CSS, however, in that they allow you to apply styles, graphics, and even CSS files themselves to the pages of your applications. You can apply ASP.NET themes at the application, page, or server control level.
In order to see how to use one of these themes, create a basic page, which includes some text, a text box, a button, and a calendar, as shown in Listing 6-1.
Example 6.1. An ASP.NET page that does not use themes
<%@ Page Language="VB" %> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>STLNET</title>
</head> <body> <form id="form1" runat="server"> <h1>St. Louis .NET User Group</h1><br /> ...