Hello to everybody, how i can know a sms gateway or webservice so that i can put in the "uriString" in the program
And also pl tell me any error in program
I have a tried a lot... , but i could not
Please help me to finish as early as posible......
So much time i failed...
Posted Date:-18 feb 2008
Davidson
And also pl tell me any error in program
Code:
Dim client As New WebClient
Dim sendNameValueCollection As New NameValueCollection
Dim uriString As String = ' "wwwe.way2sms.com"
Dim login As String = "sdds@mm.in"
Dim passwd As String = "dfdfewf"
Dim type As String = "textmsg"
Dim phone As String = "919000490"
Dim content As String = txtcontent.Text
Try
sendNameValueCollection.Add("login", login)
sendNameValueCollection.Add("passwd", passwd)
sendNameValueCollection.Add("type", type)
sendNameValueCollection.Add("phoneno", phone)
sendNameValueCollection.Add("message", content)
Dim responseArray As Byte() = client.UploadValues(uriString, "POST", sendNameValueCollection)
lblSuccess.Text = ControlChars.Lf + "Response received was " + Encoding.ASCII.GetString(responseArray)
sendNameValueCollection.Clear()
Catch we As WebException
lblSuccess.Text = "Network Error: " + we.Message + ControlChars.Lf + "Status code: " + we.Status
Catch ufe As UriFormatException
lblSuccess.Text = "URI Format Error: " + ufe.Message
End Try
End Sub
Please help me to finish as early as posible......
So much time i failed...
Posted Date:-18 feb 2008
Davidson
Comment