通过asp.net c#在手机上发送消息 [英] send message on mobile by asp.net c#

查看:67
本文介绍了通过asp.net c#在手机上发送消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我在电子商务网站上工作。我想在订单完成后在客户的手机上发送消息。

我使用了很多解决方案但没有成功。请告诉我一个最佳解决方案。

解决方案

使用Asp.net发送短信 [ ^ ]


Hai,我给出了一个建议..



这里你添加 uid =(您的手机号码)

pwd =(way2sms pwd)

msg =(您的文字)我在这个编码中使用过测试我的项目

还可以使用System.Net.Mail添加命名空间

;< br / > 
使用System.IO.Ports;



尝试这一点肯定可以帮到你......

祝你节日快乐!!

  string 地址=   http://ubaid.tk/sms/sms.aspx?uid=9876543210&pwd=sample& amp; msg =测试我的项目& phone = + TextBox3.Text +  & provider = way2sms; 
HttpWebRequest request =(HttpWebRequest)WebRequest.Create(Address);
WebResponse response = null ;
StreamReader reader = null ;
response = request.GetResponse();
reader = new StreamReader(response.GetResponseStream(),Encoding.UTF8);
string result = reader.ReadToEnd();
reader.Close();
if (result == 1
{
Label8.Text = 邮件和短信已发送< /跨度>;

(或)

Response.Write( 发送短信成功);

}


1)您可以通过SMS服务提供商发送短信,该服务提供商提供API以从您的代码发送短信并获取一些短信收费。



2)您可以通过GSM MODEM发送短信,您可以在其中插入您的电话SIM卡,它将通过您的SIM卡发送短信。

hello,
I working on E-commerce website. I want to send a message on customer''s mobile after order completion.
I have used many solutions but not succeed. Please tell me a best solution.

解决方案

Sending Sms Using Asp.net[^]


Hai, i give a suggestion..

here u add uid=(Your mobile number)
pwd=(way2sms pwd)
msg=(Your Text) in this coding i used "Testing of my project"
And also you can add namespaces
"

using System.Net.Mail;<br />
using System.IO.Ports;

"
try this it will surely helps you...
Have a happy day!!

string Address = "http://ubaid.tk/sms/sms.aspx?uid=9876543210&pwd=sample &msg=Testing of my project &phone=" + TextBox3.Text + "&provider=way2sms";
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Address);
            WebResponse response = null;
            StreamReader reader = null;
            response = request.GetResponse();
reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8);
            string result = reader.ReadToEnd();
            reader.Close();
            if (result == "1")
            {
                Label8.Text = "Mail and Sms has Sent ";
                          
                          (or)
    
                Response.Write("SMS sent successfully");
               
            }


1) You can send sms via a SMS service provider which provides API to send sms from your code and takes some charges.

2) You can send sms via "GSM MODEM" in which you can insert YOUR PHONE SIM CARD and it will send sms via your sim card.


这篇关于通过asp.net c#在手机上发送消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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