O'Reilly logo

VB.NET Language in a Nutshell, Second Edition by Steven Roman PhD, Paul Lomax, Ron Petrusha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required