ClassSystem.Web.Services.WebServiceAttribute Applies ToClass ConstructorNew( ) Properties
DescriptionThe <WebService> attribute is used to assign a namespace and a description to an ASP.NET web service. Each web service must also include the "@ WebService" directive. ExampleThe example uses an ".asmx" file with the following contents: <%@ WebService Language="VB" Codebehind="Hello.asmx.vb" %> It has the following code-behind file: Option Strict Imports System.Web.Services <WebService(Name:="Hello", _ Description:="Displays a greeting to the user.", _ Namespace:="http://www.oreilly.com/VbNet")> _ Public Class HelloWebService <WebMethod> Public Function SayHello(ToWhom As String) As String Return "Hello, " & ToWhom End Function End Class See AlsoWebMethod Attribute |