WebMethod Attribute


WebMethod Attribute

Class

System.Web.Services.WebMethodAttribute

Applies To

Method

Constructors

     New([[[[enableSession], transactionOption], cacheDuration], _     bufferResponse]) 


enableSession (optional; Boolean)

Indicates whether session state is enabled for the web method call (true) or not (False). If omitted, the default value is False.


transactionOption (optional; TransactionOption enumeration)

Indicates whether the web method supports transactions. One of the following System.EnterpriseServices.TransactionOption enumeration values: Disabled, NotSupported, Supported, Required, and RequiresNew. A web method must participate as the root object of a transaction. Because of this, Supported and NotSupported are both equivalent to NotSupported, and Required and RequiresNew are both equivalent to RequiresNew. If omitted, the default value is Disabled.


cacheDuration (optional; Integer)

Indicates the number of seconds the response to the web method request should be stored in the cache. If omitted, the default value is 0, which indicates that responses to web methods are not cached.


bufferResponse (optional; Boolean)

Indicates whether the response to the web method request is buffered (true) or not (False). If omitted, the default value is TRue.

Properties


BufferResponse (Boolean)

Value from the bufferResponse constructor parameter.


CacheDuration (Integer)

Value from the cacheDuration constructor parameter.


Description (String)

Provides a description for the web service that is displayed in the Service Description page and the Web Service Help page. Its default value is an empty string.


EnableSession (Boolean)

Read-only. Value from the enableSession constructor parameter.


MessageName (String)

Identifies the public name by which the web method is invoked by clients. Since web methods do not support overloading, the property provides a method for identifying overloaded methods that share the same name. Its default value is the name of the web method.


TransactionOption (TransactionOption enumeration)

Read-only. Value from the transactionOption constructor parameter.

Description

The <WebMethod> attribute marks a method within a web service as a web method callable from a web client. The method and the class to which it belongs must be public and must be part of an ASP.NET application.




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

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