Name
ContentEncoding
Synopsis
ce = Request.ContentEncoding
Returns an instance of the
Encoding
class (located in the System.Text
namespace), which represents the character encoding of the body of
the current request.
Parameters
-
ce
An Object variable of type Encoding.
Example
The example demonstrates how to display the current ContentEncoding to the user:
Sub Page_Load( ) Dim ce As System.Text.Encoding ce = Request.ContentEncoding Message.Text = "Current encoding is: " & ce.EncodingName & "." End Sub
For a request using UTF-8 content encoding, the output of this example would be:
Current encoding is: Unicode (UTF-8).
Get ASP.NET in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.