c#: 向后台发送消息
2007-05-17 11:21
363 查看
向后台发送消息
===========================================================
//htm,aspx
xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttpReq.open('POST',xmlurl,false);
xmlHttpReq.send(sxml);
if (xmlHttpReq.status != 200)
{
var sText = xmlHttpReq.statusText;
alert(sText);
}
else
{
var sText = xmlHttpReq.responseText;
}
//aspx.cs
byte[] byts = new byte[Request.InputStream.Length];
Request.InputStream.Read(byts,0,byts.Length);
string req = System.Text.Encoding.Default.GetString(byts);
req=Server.UrlDecode(req);
trace(req);
...
...
...
output="<root><req text='" + output+ "' errcode='" + errcode + "'>" +purview + "</req></root>";
Response.Write(output);
Response.End();
===========================================================
//htm,aspx
xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttpReq.open('POST',xmlurl,false);
xmlHttpReq.send(sxml);
if (xmlHttpReq.status != 200)
{
var sText = xmlHttpReq.statusText;
alert(sText);
}
else
{
var sText = xmlHttpReq.responseText;
}
//aspx.cs
byte[] byts = new byte[Request.InputStream.Length];
Request.InputStream.Read(byts,0,byts.Length);
string req = System.Text.Encoding.Default.GetString(byts);
req=Server.UrlDecode(req);
trace(req);
...
...
...
output="<root><req text='" + output+ "' errcode='" + errcode + "'>" +purview + "</req></root>";
Response.Write(output);
Response.End();
相关文章推荐
- 微信通过openID发送消息/后台post、get提交并接收数据 C# .NET 配置404,500等错误信息 连接字符串
- c# 使用udp发送和读取消息
- [转] C#中发送消息给指定的窗口,以及接收消息
- 使用C#在应用程序间发送消息
- C# 后台使用HttpWebRequest发送POST请求帮助类
- 使用C#编程将websphere MQ 5.3 windows客户端消息发送到linux服务器端
- C#TCPClient应用-一个简单的消息发送和接收
- C#模拟登录Facebook 实现发送消息、评论帖子
- 从COM中发送一个自定义消息给C#程序
- C# Web实时消息后台服务器推送技术---GoEasy
- 微信实验六、微信PHP后台验证、接收和发送消息及源码下载
- C#可调用API接口来获取窗口句柄,发送消息控制其余程序窗体大小
- 一个Windows后台服务(.Net的C#版) - 定时访问数据库循环发送手机短信
- [原创]C#应用WindowsApi实现查找\枚举(FindWindow、EnumChildWindows)窗体控件,并发送消息。
- 某大神C#框架后台发送信息的查找及破解
- xmpp关于后台挂起的消息接收,后台消息推送,本地发送通知
- Coolite(ExtJS)向后台Asp.net C#发送参数
- C#利用UdpClient发送广播消息
- 一个Windows后台服务(.Net的C#版) - 定时访问数据库循环发送手机短信
- C#调用WinAPI发送消息SendMessage