Documentation for: ASP.NET Ajax Version 1.0

This documentation is for a previous version. For the current released version, see the ASP.NET Ajax documentation on MSDN.

 

 

 

 

 

 

 

Sys.Net.MultipleCallers Sample

vb/WebService.asmx

<%@ WebService Language="VB" Class="Samples.AspNet.WebService" %>

Imports System.Web
Imports System.Web.Services
Imports System.Xml
Imports System.Web.Services.Protocols
Imports System.Web.Script.Services

Namespace Samples.AspNet
    
    <WebService(Namespace:="http://tempuri.org/")> _
    <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
    <ScriptService()> _
    Public Class WebService
        Inherits System.Web.Services.WebService
    
        <WebMethod()> _
        Public Function Add(ByVal a As Integer, _
        ByVal b As Integer) As String
        
            Dim addition As Integer = a + b
            Dim result As String = _
            String.Format("The addition result is {0}.", addition.ToString())
        
            Return result
    
        End Function 'Add
     
    End Class 'WebService 
    
End Namespace