Thursday, August 25, 2011

Web based SMS Sending Code in ASP.Net without using redirect method

Web based SMS Sending Code in ASP.Net without using redirect method

ASP.NET (vb)  code is given below:


Dim smsText As String
smsText = "YOUR SMS TEXT TO BE SEND"

Dim mobileNumber as string
mobileNumber = 9898989898

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.
' Close the response to free resources.

myResponse.Close()


No comments: