我有一个将短信发送到提供的手机号码的网址。我只想从Windows应用程序中调用此URL,但不要在浏览器中打开。我只想从Windows应用程序执行该URL。
网址示例
http://mycompany.com/sms.aspx?mobilenum=9123444777&Message=this is a test message
我已经尝试过这种方式。但是它正在浏览器中打开。我不希望在浏览器中打开它。我只想在内部执行此行。
System.Diagnostics.ProcessStartInfo sInfo = new
System.Diagnostics.ProcessStartInfo("http://mycompany.com
/sms.aspx?mobilenum=9123444777&Message=this is a test message");
System.Diagnostics.Process.Start(sInfo);
谢谢。
您是否尝试过使用HttpWebRequest?
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(@"http://mycompany.com/sms.aspx?mobilenum=9123444777&Message=this%20is%20a%20test%20message");
WebResponse response = request.GetResponse();
response.Close();
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句