Page.Theme Property
.NET Framework 3.0
Gets or sets the name of the page theme.
Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
| Exception type | Condition |
|---|---|
|
An attempt was made to set Theme after the PreInit event has occurred. | |
|
Theme is set to an invalid theme name. |
The Theme property sets the name of the theme used for the page.
The Theme property must be set prior to the PreInit event; setting the Theme property after the PreInit event will cause an InvalidOperationException exception.
The specified theme must exist as either an application or a global theme. If the theme does not exist, an HttpException exception s thrown.
| Topic | Location |
|---|---|
| How to: Apply ASP.NET Themes Programmatically | Building ASP .NET Web Applications |
| How to: Apply ASP.NET Themes Programmatically | Building ASP .NET Web Applications |
Community Additions
ADD
Show: