Using a Web Service to Send SMS Text Messages in ASP.NET
By: Darren Cosker
The code snippet supplied uses a web service that can send an SMS text message to 90% of all mobile phones.
Before using the below code you must link the web service
. Information available on
Private Sub SendMessage(ByVal p_sPhoneNumber As String, _
ByVal p_sMessage As String, ByVal p_sUsername As String, _
ByVal p_sPasskey As String)
Dim smsService As New SMSService.SMSMessagingprocessService()
Dim sCountryCodes As String
Try
If smsService.ValidPhoneNumber(p_sPhoneNumber) Then
Dim result As Boolean = smsService.SendMessage(p_sPhoneNumber, _
p_sMessage, p_sUsername, p_sPasskey)
If result = True Then
MsgBox("The message was sent", MsgBoxStyle.Information, _
"SMS Messaging"

Else
MsgBox("The message could not be sent", _
MsgBoxStyle.Information, "SMS Messaging"

End If
End If
Catch ex As SoapException
MsgBox("An exception occured. " & ex.Detail.InnerText, _
MsgBoxStyle.Critical, "SMS Messaging"

End Try
End Sub
Thanks Darren
FrOg 8)