WebMethod Attribute

   
WebMethod Attribute

Class

System.Web.Services.WebMethodAttribute

Applies to

Method

Description

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.

Constructors

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

Indicates whether session state is enabled for the web method call.

transactionOption (System.EnterpriseServices.TransactionOption enumeration)

Indicates whether the web method supports transactions. Possible values are Disabled , NotSupported , Supported , Required , and RequiresNew .

cacheDuration (Integer)

Indicates the number of seconds the response to the web method request should be stored in the cache.

bufferResponse (Boolean)

Indicates whether the response to the web method request is buffered.

Properties

BufferResponse (Boolean)

Indicates whether the response to the web method request is buffered. Its default value is True .

CacheDuration (Integer)

Defines the number of seconds the server caches the response to the web method request. Its default value is 0; responses to web methods are not cached.

Description (String)

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

EnableSession (Boolean)

Read-only. Indicates whether session state is enabled for the web method call. Its default value is False .

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 (System.EnterpriseServices.TransactionOption enumeration)

Read-only. Indicates whether the web method supports transactions. Possible values are 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. Its default value is Disabled .

   


VB.Net Language in a Nutshell
VB.NET Language in a Nutshell
ISBN: B00006L54Q
EAN: N/A
Year: 2002
Pages: 503

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