Dim dt As New DataTable
CreateDataTable(dt, "select * from Table where Id = 1")
If (dt.Rows.Count > 0) Then
Dim request As HttpWebRequest
Dim response As HttpWebResponse = Nothing
Dim url As String
Dim senderid As String = dt.Rows(0).Item("SenderId").ToString()
Dim password As String = dt.Rows(0).Item("Password").ToString()
Dim host As String
Dim originator As String = dt.Rows(0).Item("UserName").ToString()
Try
host = "http://smsidea.co.in/sendsms.aspx?"
'originator = "3423434343"
'password = "234hj"
url = host + "mobile=" & HttpUtility.UrlEncode(originator) _
& "&pass=" + HttpUtility.UrlEncode(password) _
& "&senderid=" + HttpUtility.UrlEncode(senderid) _
& "&to=" + HttpUtility.UrlEncode(StrToNumber) _
& "&msg=" + HttpUtility.UrlEncode(StrBody)
request = DirectCast(WebRequest.Create(url), HttpWebRequest)
response = DirectCast(request.GetResponse(), HttpWebResponse)
'MessageBox.Show("Response: " & response.StatusDescription)
Catch ex As Exception
End Try