The Encoding used to make the client request to the XML Web service.
Assembly: System.Web.Services (in System.Web.Services.dll)
Property ValueType: System.Text.Encoding
The character encoding for the client request. The default is a null reference (Nothing in Visual Basic), which uses the default encoding for the underlying transport and protocol.
The determines the encoding for the request message. The ContentType of the request will be annotated with the encoding value.
Classes deriving from WebClientProtocol support a particular protocol, such as SoapHttpClientProtocol does for SOAP, set this property to conform to encoding requirements for the specific protocol. For example, the SoapHttpClientProtocol sets the default encoding to UTF-8.
The following example is an ASP.NET Web Form, which calls an XML Web service named Math. Within the EnterBtn_Click function, the Web Form explicitly sets RequestEncoding to UTF-8.
This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.