GlobalizationSection.ResponseHeaderEncoding Property

 

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

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

[ConfigurationPropertyAttribute("responseHeaderEncoding", DefaultValue = "utf-8")]
public Encoding ResponseHeaderEncoding { get; set; }

Property Value

Type: System.Text.Encoding

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

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

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

// Display ResponseHeaderEncoding property.
Console.WriteLine("ResponseHeaderEncoding: {0}", 
  configSection.ResponseHeaderEncoding);

.NET Framework
Available since 2.0
Return to top
Show: