HttpMethodAttribute

HttpMethodAttribute

System.Web.Services.Protocols (system.web.services.dll)sealed class

This attribute is used to bind methods in an HttpGetClientProtocol or HttpPostClientProtocol proxy class to web service methods.

The ParameterFormatter property specifies how the proxy encodes parameters before sending them to a web service method. The ReturnFormatter property specifies how the proxy class decodes the web method's return value. Both values must be set, as there is no default value. Set ReturnFormatter to the UrlParameterWriter type if you are using HTTP GET or the HtmlFormParameterWriter type if you are using HTTP POST. Always set ParameterFormatter to the XmlReturnReader type. An example attribute declaration for HTTP GET is <HttpMethodAttribute(GetType(XmlReturnReader), GetType(UrlParameterWriter))>.

public sealed class HttpMethodAttribute : Attribute { // Public Constructors    public HttpMethodAttribute( );    public HttpMethodAttribute(Type returnFormatter, Type parameterFormatter); // Public Instance Properties    public Type ParameterFormatter{set; get; }    public Type ReturnFormatter{set; get; } }

Hierarchy

System.Object System.Attribute HttpMethodAttribute

Valid On

Method



ASP. NET in a Nutshell
ASP.NET in a Nutshell, Second Edition
ISBN: 0596005202
EAN: 2147483647
Year: 2003
Pages: 873

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net