Using Stylesheets 

A StyleSheet control must be placed directly on an ASP.NET mobile Web page or on a mobile user control page (not in a Form or Panel container). You can have only one StyleSheet control per page or mobile user control. In Design view of the IDE, the control displays its name and ID on the top line of the control. In addition, it displays information about the current template device filter.

After you add a StyleSheet control to a mobile Web page, you can then open the Styles Editor and Templating Options dialog boxes to define these properties. The Styles Editor dialog box enables you to define styles, which it displays in the Defined Styles list. All defined styles must be based on a style type shown in the Style Types list. When you select a Style Type and add it to the Defined Styles list, the defined style is added as an instance of that style type. You can create multiple defined styles based on the same style type.

If you want use styles in multiple mobile Web pages, add them to an external style sheet. Link a StyleSheet control to an external style sheet by storing the style sheet file name in the StyleSheet control's ReferencePath property. External style sheets are contained in .ascx files. For more information, see User Controls. Styles defined within an external style sheet are not used for rendering during design-time. In addition, these styles will not appear in the StyleReference property list when you edit other controls.

See Also

Tasks

How to: Add and Configure a StyleSheet Control

Concepts

Introduction to the StyleSheet Control
Introduction to the Panel Control

Other Resources

Customizing with Control Templates