GlobalizationSection.ResponseEncoding Property

 

Gets or sets a value specifying the content encoding of HTTP responses.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

<ConfigurationPropertyAttribute("responseEncoding", DefaultValue := "utf-8")>
Public Property ResponseEncoding As Encoding

Property Value

Type: System.Text.Encoding

The content encoding of HTTP responses. The default is UTF-8.

The ResponseEncoding property gets or sets a value specifying the content encoding of HTTP responses. The default encoding is UTF-8.

The following code example demonstrates how to use the ResponseEncoding property. This code example is part of a larger example provided for the GlobalizationSection class.

' Display ResponseEncoding property.
Console.WriteLine("ResponseEncoding: {0}", _
 configSection.ResponseEncoding)

.NET Framework
Available since 2.0
Return to top
Show: