If e.DataCol.Name = "第二列" Then Dim s As String = "" For Each r As Row In Tables("表C").rows s &= r("第一列") & "," & r("第二列") & vbcrlf Next msgbox(s) Dim server As String = "http://192.168.0.101:8080" Dim phones As String = "134207****3" Dim context As String = System.Web.HttpUtility.UrlEncode(s) Dim url As String = server & "/?numbers=" & phones & "&text=" & context try Dim rqst As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url) Dim rsps As System.Net.HttpWebResponse = rqst.GetResponse rsps.close 'Dim stm As System.IO.Stream = rsps.GetResponseStream() 'Dim reader As New System.IO.StreamReader(stm) 'Dim strResult As String = reader.ReadToEnd 'msgbox(strResult) msgbox("提交发送成功") catch ex As exception msgbox("发送失败,请确认服务器地址设置正确!") End try End If
|