Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

HttpRequest.ContentEncoding Property

Gets or sets the character set of the entity-body.

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

public Encoding ContentEncoding { get; set; }
/** @property */
public Encoding get_ContentEncoding ()

/** @property */
public void set_ContentEncoding (Encoding value)

public function get ContentEncoding () : Encoding

public function set ContentEncoding (value : Encoding)

Not applicable.

Property Value

An Encoding object representing the client's character set.

Default content encoding can be specified in the globalization Element (ASP.NET Settings Schema) of a configuration file. If content encoding is also specified by the client, the default configuration settings are overridden.

The following code example assigns a value representing the description of the current HTTP encoding to a string variable.

String EncodingType;
 EncodingType = Request.ContentEncoding.EncodingName;
   

String encodingType;
encodingType = get_Request().get_ContentEncoding().get_EncodingName();

var encodingType : String = Request.ContentEncoding.EncodingName
  

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.