ASP.net远程控制 [英] ASP.net remote controlling
本文介绍了ASP.net远程控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
dears;
我有一个网站项目正在工作,我想将它连接到诺基亚PC套件并使用网站上的按钮发送短信使用PC套件,我可以得到你的帮助?
提前超过..
dears;
I have a website project working on, I want to connect it to Nokia PC suite and make the button from the website send an SMS using the PC suite , can I get your help?
thanx in advance..
推荐答案
嗨
我有解决方案我自己有趣的人...
in webform1.aspx
]]>
< title>
Num
短信
< br $>
然后我们使用Webform1.aspx.cs中的代码//如果你使用C#:
使用System;
使用System.Collections.Generic ;
使用System.Linq;
使用System.Web;
使用System.Web.UI;
使用System.Web.UI.WebControls;
使用System.IO .Ports;
命名空间短信
{
public partial class WebForm1:System.Web.UI.Page
{
SerialPort SP = new SerialPort(); //创建一个SerialPort以作为modddem访问Mobile
protected void Page_Load(object sender,EventArgs e)
{
}
protected void Button1_Click(object sender,EventArgs e)
{
SP.PortName =COM1; //你的手机作为调制解调器,你可以知道它是COM?来自控制面板/电话和调制解调器。然后看看你的手机是什么COM吧!
SP.BaudRate = 9600; //必须像手机和调制解调器中的手机属性一样显示
SP.DataBits = 8; //保持原样
SP.Parity = Parity.None; //保持原样
SP.StopBits = StopBits.One; //保持原样
SP.Open(); //打开端口准备发送短信
字符串PH_NU;
PH_NU = char.ConvertFromUtf32(34)+ TextBox1.Text + char.ConvertFromUtf32(34); ..告诉端口取你输入的电话号码
SP.Write(AT + CMGF = 1+ char.ConvertFromUtf32(13));
SP。写(AT + CMGS =+ PH_NU + char.ConvertFromUtf32(13));
SP.Write(TextBox2.Text + char.ConvertFromUtf32(26)+ char.ConvertFromUtf32(13)); //使用上面两行中的属性在TextBox2中发送消息。
SP.Close();
}
}
}
Hi I had the solution my self to whom intersted..
in webform1.aspx
]]>
<title>
Num
SMS
and then we use the code in Webform1.aspx.cs // if you are using C#:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO.Ports;
namespace SMS
{
public partial class WebForm1 : System.Web.UI.Page
{
SerialPort SP = new SerialPort(); // create a SerialPort to access the Mobile as a modddem
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
SP.PortName = "COM1"; // your mobile as modem, you can know it is COM? from Control Panel / Phones and Modems . then see your mobile what COM is it!
SP.BaudRate = 9600; // necessary to be as it shown in your phone properties in phones and modems
SP.DataBits = 8; // leave it as is
SP.Parity = Parity.None; //leave it as is
SP.StopBits = StopBits.One; //leave it as is
SP.Open(); // opening the port to be ready sending the SMS
string PH_NU;
PH_NU = char.ConvertFromUtf32(34) + TextBox1.Text + char.ConvertFromUtf32(34); .. tell the port to take the Phone Num you entered
SP.Write("AT+CMGF=1"+char.ConvertFromUtf32(13));
SP.Write("AT + CMGS="+PH_NU + char.ConvertFromUtf32(13));
SP.Write(TextBox2.Text + char.ConvertFromUtf32(26) + char.ConvertFromUtf32(13)); // sending the message in TextBox2 using the properties in the two above lines.
SP.Close();
}
}
}
这篇关于ASP.net远程控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文