Web based SMS Sending Code in ASP.Net without using redirect method
ASP.NET (vb) code is given below:
strURL = "http://URL_OF_SMS_GATEWAY/SendSMS.aspx?userid=YourUserId&Password=YourPassword&send=SenderCode&TargetMobileNumber=" & mobileNumber & "&SMSText=" & smsText
Dim myRequest As WebRequest = WebRequest.Create(strURL)
' Return the response
Dim myResponse As WebResponse = myRequest.GetResponse()
' Code to use the WebResponse goes here.
ASP.NET (vb) code is given below:
Dim smsText As String
smsText = "YOUR SMS TEXT TO BE SEND"
Dim mobileNumber as string
mobileNumber = 9898989898
Dim myRequest As WebRequest = WebRequest.Create(strURL)
' Return the response
Dim myResponse As WebResponse = myRequest.GetResponse()
' Close the response to free resources.
myResponse.Close()
No comments:
Post a Comment