使用way2sms从c#发送短信 [英] sending sms from c# using way2sms

查看:132
本文介绍了使用way2sms从c#发送短信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在本节中,我们使用第3种解决方案。在运行时,页面显示消息发送成功,但短信未传送到给定的号码。使用这个编码,会怎么做?



In this section we use the 3rd solution. During running time the page shows message send successfully but the sms not delivered to the given number. using this coding, what will do?

protected void btn_Click(object sender, EventArgs e)
    {
        try
        {
 
            send("way2sms_userid", "way2sms_password", txtxmsg.Text, txtphn.Text);
            Response.Write("message send successfully......");
        }
        catch
        {
            Response.Write("Error Occured!!!");
        }
    }
    public void send(string uid, string password, string message, string no)
    {
        HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("http://ubaid.tk/sms/sms.aspx?uid=" + uid + "&pwd=" + password + "&msg=" + message + "&phone=" + no + "&provider=way2sms");
        HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();
        System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
        string responseString = respStreamReader.ReadToEnd();
        respStreamReader.Close();
        myResp.Close();
    }

推荐答案

嗨哥们





这绝对可以帮到你....



在asp.net中使用或不使用SMS Getway发送短信



乐于助人
Hi buddy


this will definitely help you....

Send SMS Using Or Without SMS Getway in asp.net

Happy to help


now它不起作用。更新一些工作源代码
now its not working . update some working source code


这篇关于使用way2sms从c#发送短信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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