Many users like to personalize their favorite web sites by setting the look and feel to meet their own aesthetic preferences. ASP.NET 2.0 supports that requirement with "themes."
A theme is a collection of skins. A skin describes how a control should look. A skin can define style sheet attributes, images, colors, and so forth.
Having multiple themes allows your users to choose how they want your site to look by switching from one set of skins to another at the touch of a button. Combined with personalization, your site can remember the look and feel each user prefers.
There are two types of themes. The first, called stylesheet themes, define
styles that may be overridden by the page or control. These are, essentially,
equivalent to CSS style sheets. The second type, called customization
themes, cannot be overridden. You set a stylesheet theme by adding
StyleSheetTheme attribute to the
Page directive, and, similarly, you set a
customization theme by setting the
attribute in the
In any given page, the properties for the controls are set in this order:
Properties are applied first from a stylesheet theme.
Properties are then overridden based on properties set in the control.
Properties are then overridden based on a customization theme.
Thus, the customization theme is guaranteed to have the final word in determining the look and feel of the control.
Skins themselves come in two flavors: default skins and explicitly named skins. Thus, you might create ...