System.Web Namespace HttpResponse Class
Sets or retrieves the HTTP character set of the output stream.
[ VB ]
Public Property ContentEncoding As Encoding
[ C# ]
public Encoding ContentEncoding {get; set;}
[ C++ ]
public: __property Encoding* get_ContentEncoding ( );
public: __property void set_ContentEncoding ( Encoding* );
[ JScript ]
public function get ContentEncoding ( ) : Encoding;
public function set ContentEncoding ( Encoding );
A Encoding object containing information about the character set of the current response.
Exception Type |
Condition |
ArgumentException |
Occurs when Attempted to set ContentEncoding to a null reference ( Nothing in Visual Basic ). |
The following example writes a human-readable description of the character set encoding to the output stream.
Response.Write ( Response.ContentEncoding.EncodingName );
Response.Write ( Response.ContentEncoding.EncodingName ) |
|
C# |
VB |
HttpResponse Members