Page.ContentType 屬性

定義

設定與頁面關聯之 HttpResponse 物件的 HTTP MIME 類型。

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

屬性值

String

與目前頁面關聯的 HTTP MIME 類型。

屬性

備註

在大部分情況下,請勿在程式碼中設定此屬性。 ContentType使用 .aspx 檔案中的@ Page指示詞來設定 屬性。 要求頁面時,動態產生的類別會設定 屬性。

適用於

另請參閱