共用方式為


Page.Culture 屬性

定義

針對與頁面關聯的 Thread 物件,設定其文化特性 ID。

protected:
 property System::String ^ Culture {  void set(System::String ^ value); };
public:
 property System::String ^ Culture { System::String ^ get(); void set(System::String ^ value); };
protected string Culture { set; }
[System.ComponentModel.Browsable(false)]
public string Culture { get; set; }
member this.Culture : string
[<System.ComponentModel.Browsable(false)>]
member this.Culture : string with get, set
Protected Property Culture As String
Public Property Culture As String

屬性值

String

有效的文化特性 ID。

屬性

備註

Culture在 .aspx 檔案的@ Page指示詞中設定 屬性。 要求頁面時,動態產生的類別會設定這個屬性的值。 此外,您也可以以程式設計方式或在Web.config檔案的全球化元素中明確設定 屬性的值 Culture

屬性 Culture 可用來協助當地語系化頁面內容。 您可以將它設定為任何有效的文化特性識別碼。 例如,文化特性識別碼會將 en-us 頁面設定為美式英文,而 fr 文化特性識別碼會將頁面設定為法文。 您也可以將執行瀏覽器慣用語言自動偵測的值設定為 auto ,並加以設定。 自動語言偵測可以使用預設值限定,例如 auto:en-us

如需詳細資訊,請參閱 CultureInfo 類別概觀。

適用於

另請參閱