how to send sms with vb with asp.net

Posted by Shanky11 under ASP.NET on 2/20/2013 | Points: 10 | Views : 2143 | Status : [Member] | Replies : 2
if anyone knows then please povide the full code
for it




Responses

Posted by: Ranjeet_8 on: 2/22/2013 [Member] [MVP] Gold | Points: 25

Up
0
Down
Try this,

Public Sub SendSingle(phonenumber As String, message As String)
' Add URL Provided by Your Vender
Dim appsettingSendSmsKey As String = "http://www.YourProviderDomain.com/Sendsms.aspx?|Username|password|sendfrom|cdmaHeader"

Dim sendsmskey As String() = appsettingSendSmsKey.Split("|"c)
Dim URL As String = sendsmskey(0)
Dim usernam As String = sendsmskey(1)
Dim password As String = sendsmskey(2)
Dim sendfrom As String = sendsmskey(3)
Dim CdmaHeader As String = sendsmskey(4)
Dim sburl As New StringBuilder()
sburl.Append(URL)
sburl.Append("UserName=")
sburl.Append(usernam)
sburl.Append("&password=")
sburl.Append(password)
sburl.Append("&SenderID=")
sburl.Append(sendfrom)
sburl.Append("&MobileNo=")
sburl.Append(phonenumber)
sburl.Append("&CDMAHeader=")
sburl.Append(CdmaHeader)
sburl.Append("&Message=")
sburl.Append(message)
Dim request As WebRequest = Nothing
request = WebRequest.Create(sburl.ToString())
request.Method = WebRequestMethods.Http.[Get]
Dim respnse As WebResponse = Nothing
respnse = request.GetResponse()
Dim sr As New StreamReader(respnse.GetResponseStream())
Dim str As String = sr.ReadToEnd()
sr.Close()
respnse.Close()
End Sub


Please Mark As Answer if this helps you.

.

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Szurcsii on: 3/26/2014 [Member] Starter | Points: 25

Up
0
Down
Hi Shanky 11!

Try this code for sending/receiving text messages with asp.net: http://www.ozekisms.com/index.php?owpn=586
In this website you can find an example written in asp.net.

I hope i can help you!

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response