Creating ASP.NET Web Services—The WebMethod Attribute

Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio


Jump to: navigation, search
CSharp-Online.NET:Articles
ASP.NET Articles

Create ASP.NET Web Services

© 2002 O'Reilly & Assoc., Inc.

The WebMethod Attribute

The WebMethod attribute, first used in Example 2-1, tells .NET that a particular public method should be exposed as a web-callable method. The WebMethod attribute has six associated properties to document and change the behavior of your web method. They are:

* Description

* MessageName

* EnableSession

* CacheDuration

* TransactionOption

* BufferResponse

The first two properties are used to document a web method, while the others affect its behavior. In the following sections, we'll introduce each briefly.


Previous_Page_.gif Next_Page_.gif

Today's Deals: Electronics

Personal tools