如何在c#.net中单击发送短信给多个用户? [英] How to send SMS to multiple users at a single click in c#.net?

查看:44
本文介绍了如何在c#.net中单击发送短信给多个用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在c#.net中单击发送短信给多个用户?

以及如何在我们的应用程序中使用SMS API(Bulk sms / site2sms).......

解决方案

< pre lang =c#> // 使用此代码..

public void send( string message,< span class =code-keyword> string no)
{

HttpWebRequest myReq =
// 例如:(HttpWebRequest)WebRequest.Create(http://ubaid.tk/sms/sms.aspx?uid=+ uid +& pwd =+ password +
// & msg =+ message +& phone = + no +& provider = way2sms);
(HttpWebRequest)WebRequest.Create( puturlink = + UrUsername + & password = + UrPassword + & sender = + UrSenderID + < span class =code-string>& to = + no + & message = + message + & reqid = 1& format = {json | text}& route_id = route + id& callback = Any + Callback + URL& unique = 1& sendondate = + 10-10 -2014T05:17:52 + );
HttpWebResponse myResp =(HttpWebResponse)myReq.GetResponse();
System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
string responseString = respStreamReader.ReadToEnd();
respStreamReader.Close();
myResp.Close();
}

// 按钮点击代码
protected void btn_send_Click( object sender,EventArgs e)
{

send(txt_message.Text,txt_mobile.Text);

ScriptManager.RegisterStartupScript( this this .GetType(), popup alert('sms sent successfully ...'); true );

}





参考:

1)发送免费和批量短信到使用ASP.Net使用Way2SMS和FullOnSMS账户的手机号码

2)如何从ASP.Net应用程序向移动设备发送免费短信


How to send SMS to multiple users at a single click in c#.net?????
as well as how to use SMS API in our application(Bulk sms/site2sms).......

解决方案

//Use this code..

public void send(string message, string no)
{

HttpWebRequest myReq =
// Eg: (HttpWebRequest)WebRequest.Create("http://ubaid.tk/sms/sms.aspx?uid=" + uid + "&pwd=" + password +
//"&msg=" + message + "&phone=" + no + "&provider=way2sms");
(HttpWebRequest)WebRequest.Create("puturlink = "+"UrUsername"+ "&password=" + "UrPassword" + "&sender=" +"UrSenderID"+ "&to=" +no+ "&message=" + message+ "&reqid=1&format={json|text}&route_id=route+id&callback=Any+Callback+URL&unique=1&sendondate=" +"10-10-2014T05:17:52"+"");
HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();
System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
string responseString = respStreamReader.ReadToEnd();
respStreamReader.Close();
myResp.Close();
}

//Button Click code
protected void btn_send_Click(object sender, EventArgs e)
{

send(txt_message.Text, txt_mobile.Text);

ScriptManager.RegisterStartupScript(this, this.GetType(), "popup", "alert('sms sent successfully...');", true);

}



Ref :
1) Send free and bulk SMS to mobile numbers using Way2SMS and FullOnSMS accounts using ASP.Net
2) How to send free SMS from ASP.Net application to Mobile


这篇关于如何在c#.net中单击发送短信给多个用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆