Export (0) Print
Expand All

Page::StyleSheetTheme Property

Updated: February 2010

Gets or sets the name of the theme that is applied to the page early in the page life cycle.

Namespace:  System.Web.UI
Assembly:  System.Web (in System.Web.dll)

[BrowsableAttribute(false)]
public:
virtual property String^ StyleSheetTheme {
	String^ get ();
	void set (String^ value);
}
<asp:Page StyleSheetTheme="String" />

Property Value

Type: System::String
The name of the theme that is applied to the page early in the page life cycle.

ExceptionCondition
InvalidOperationException

An attempt was made to set the StyleSheetTheme property after the FrameworkInitialize method was called.

ArgumentException

StyleSheetTheme is set to an invalid theme name. This exception is thrown when the FrameworkInitialize method is called, not by the property setter.

This property does not refer directly to a cascading style sheet (CSS). The property contains the name of an ASP.NET theme, which can include CSS files within it.

The StyleSheetTheme property specifies the name of a theme that is applied to a page early in the page life cycle, whereas the Theme property specifies the name of a theme that is applied to a page later in the page life cycle. This means that settings on the page take precedence over settings in the style sheet theme. For more information, see ASP.NET Themes and Skins Overview.

You typically set a value for this property in the page directive or by overriding the property. For information, see the following topics:

TopicLocation
How to: Apply ASP.NET Themes ProgrammaticallyBuilding ASP .NET Web Applications
How to: Apply ASP.NET Themes ProgrammaticallyBuilding ASP .NET Web Applications

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0

Date

History

Reason

February 2010

Described the difference between the StyleSheetTheme and Theme properties.

Customer feedback.

Community Additions

ADD
Show:
© 2014 Microsoft