HttpResponse.Charset 屬性

定義

取得或設定輸出資料流的 HTTP 字元集。

public:
 property System::String ^ Charset { System::String ^ get(); void set(System::String ^ value); };
public string Charset { get; set; }
member this.Charset : string with get, set
Public Property Charset As String

屬性值

輸出資料流的 HTTP 字元集。

例外狀況

在標頭送出之後,設定 Charset 屬性。

範例

下列範例會檢查輸出資料流程的字元集是否為歐洲中部 (ISO) 。

if (Response.Charset == "iso-8859-2")
{
    // ...
}
If Response.Charset = "iso-8859-2" Then
    '...
End If

備註

屬性 Charset 可以設定為 null 以隱藏 HTTP Content-Type 標頭。

適用於