This documentation is archived and is not being maintained.
HttpResponse.Charset Property
.NET Framework 1.1
Gets or sets the HTTP character set of the output stream.
[Visual Basic] 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);
Property Value
The HTTP character set of the output stream.
Exceptions
| Exception Type | Condition |
|---|---|
| HttpException | Charset was set after headers were sent. |
Remarks
Charset can be set to a null reference (Nothing in Visual Basic) to suppress the HTTP Content-Type header.
Example
The following example takes action only if the character set of the output stream is Central European (ISO).
[Visual Basic] If Response.Charset = "iso-8859-2" Then '... End If [C#] if (Response.Charset == "iso-8859-2") { // ... } [C++] if (Response->Charset->Equals(S"iso-8859-2")) { // ... } [JScript] if(Response.Charset == "iso-8859-2"){ //... }
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
HttpResponse Class | HttpResponse Members | System.Web Namespace
Show: