This documentation is archived and is not being maintained.
HttpRequest.ContentEncoding Property
.NET Framework 1.1
Gets or sets the character set of the entity-body.
[Visual Basic] 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);
Property Value
An Encoding object representing the client's character set.
Remarks
Default ContentEncoding can be specified in an ASP.NET configuration file in the <globalization> Element section. If ContentEncoding is specified by the client, the default configuration settings are overridden.
Example
The following example assigns a value representing the description of the current HTTP Encoding to a string variable.
[Visual Basic] Dim EncodingType As String EncodingType = Request.ContentEncoding.EncodingName [C#] String EncodingType; EncodingType = Request.ContentEncoding.EncodingName; [C++] String* EncodingType; EncodingType = Request->ContentEncoding->EncodingName; [JScript] var encodingType : String = Request.ContentEncoding.EncodingName
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
HttpRequest Class | HttpRequest Members | System.Web Namespace
Show: