Export (0) Print
Expand All

HttpEncoder.Current Property

.NET Framework 4.6 and 4.5

Gets or set the HttpEncoder type that will be used in an application.

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

public static HttpEncoder Current { get; set; }

Property Value

Type: System.Web.Util.HttpEncoder
A reference to the encoder/decoder type that will be used.


The encoder instance that is being assigned to this property is null.

If a derived HttpEncoder type is specified in the configuration file, the Current property returns a reference to the custom type. However, if no custom encoder is used, the property returns a reference to the default ASP.NET HttpEncoder instance.

The Current property is not thread-safe. Set this property only in the application's Application_Start method, because Application_Start runs on a single thread.

.NET Framework

Supported in: 4.6, 4.5, 4
© 2015 Microsoft