System.Web Namespace HttpResponse Class
Sets or retrieves the HTTP character set of the output stream.
[ VB ]
Public Property Charset As String
[ C# ]
public string Charset {get; set;}
[ C++ ]
public: __property String* get_Charset ( );
public: __property void set_Charset ( String* );
[ JScript ]
public function get Charset ( ) : String;
public function set Charset ( String );
The HTTP character set of the output stream.
Exception Type |
Condition |
HttpException |
Occurs when Charset was set after headers were sent. |
Charset can be set to a null reference ( Nothing in Visual Basic ) to suppress the Content-Type header.
The following example takes action only if the character set of the output stream is Central European ( ISO ).
if ( Response.Charset == "iso-8859-2" ) {
// ... do whatever here ...
}
If Response.Charset = "iso-8859-2" Then
' ... do whatever here ...
End If |
|
C# |
VB |
HttpResponse Members