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, andRequiresNew.-
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access