如何在asp.net中发送自动短信或使用sql [英] How to send automatic sms in asp.net or using sql
问题描述
我的表 birthdate 列,和我想发送自动短信 on perticular 时间每天,我该如何实现这一点,任何人都可以知道吗?
感谢 advance。
Dim dt As New DataTable
CreateDataTable(dt,select * from Table where Id = 1)
If(dt.Rows.Count> 0)然后
Dim request As HttpWebRequest
Dim response As HttpWebResponse =没有什么
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。行(0).Item(UserName)。ToString()
尝试
host =http://smsidea.co.in/sendsms.aspx?
'originator =3423434343
'password =234hj
url = host +mobile =& HttpUtility.UrlEncode(创始人)_
& & pass =+ HttpUtility.UrlEncode(密码)_
& & 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
结束尝试
In my table there is birthdate column, and i want send auto sms on perticular time daily, How can i implement this, Can anyone know??
Thankx in advance.
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
这篇关于如何在asp.net中发送自动短信或使用sql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!