<WebMethod(BufferResponse:=False)>
Public Function GetLargeDataSet() As DataSet
' code to retrieve and return a large amount of data
End Function
<WebMethod(CacheDuration:=60)> _
Public Function CachedFunction(ByVal Param1 As Integer, ByVal _
Param2 As Integer) As Integer
Return Param1 + Param2
End Function
<WebMethod(Description:="This method returns a string")>
Public Function GetString() As String
Return "A String"
End Function
<WebMethod(EnableSession:=True)>
Public Function TestSession() As String
If Session("UserState") Is Nothing Then
Session("UserState") = True
Return "This is the first time you have called this function"
Else
Return "You have already called this method once during your session"
End If
End Function
<WebMethod(MessageName:="MultiplyIntegers")>
Public Function Multiply(ByVal Param1 As Integer, ByVal param2 As _
Integer) As Integer
End Function
<WebMethod(MessageName:="MultiplyLongs")>
Public Function Multiply(ByVal Param1 As Long, ByVal Param2 As _
Long) As Long
End Function
<WebMethod(TransactionOption:=TransactionOption.RequiresNew)>
Public Sub TransactionFunction()
' Code to perform multiple calls that form a single atomic transaction
End Sub