Page.StyleSheetTheme Page.StyleSheetTheme Page.StyleSheetTheme Page.StyleSheetTheme Property

定義

取得或設定在網頁生命週期早期套用至網頁的佈景主題名稱。Gets or sets the name of the theme that is applied to the page early in the page life cycle.

public:
 virtual property System::String ^ StyleSheetTheme { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Browsable(false)]
public virtual string StyleSheetTheme { get; set; }
member this.StyleSheetTheme : string with get, set
Public Overridable Property StyleSheetTheme As String

屬性值

在網頁生命週期早期套用至網頁的佈景主題名稱。The name of the theme that is applied to the page early in the page life cycle.

例外狀況

已嘗試於 StyleSheetTheme 方法叫用後設定 FrameworkInitialize() 屬性。An attempt was made to set the StyleSheetTheme property after the FrameworkInitialize() method was called.

StyleSheetTheme 是設為無效的主題名稱。StyleSheetTheme is set to an invalid theme name. FrameworkInitialize() 方法不是由屬性 setter 呼叫時,擲回此例外狀況。This exception is thrown when the FrameworkInitialize() method is called, not by the property setter.

備註

這個屬性不會直接參考級聯樣式表(CSS)。This property does not refer directly to a cascading style sheet (CSS). 屬性包含 ASP.NET 主題的名稱,其中可以包含 CSS 檔案。The property contains the name of an ASP.NET theme, which can include CSS files within it.

屬性會指定在頁面生命週期早期套用至頁面的主題名稱, Theme而屬性會指定在頁面生命週期後的頁面中套用的主題名稱。 StyleSheetThemeThe 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. 如需詳細資訊,請參閱ASP.NET 主題和外觀For more information, see ASP.NET Themes and Skins.

您通常會在 page 指示詞中或藉由覆寫屬性來設定這個屬性的值。You typically set a value for this property in the page directive or by overriding the property. 如需相關資訊,請參閱下列主題:For information, see the following topics:

適用於

另請參閱