System.Web.Services.WebMethodAttribute Class

Adding this attribute to a method within an XML Web service created using ASP.NET makes the method callable from remote Web clients. This class cannot be inherited.

See Also: WebMethodAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Method, Inherited=true)]
public sealed class WebMethodAttribute : Attribute

Remarks

Methods within a class that have this attribute set are called XML Web service methods. The method and class must be public and running inside an ASP.NET Web application.

Requirements

Namespace: System.Web.Services
Assembly: System.Web.Services (in System.Web.Services.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0