ashx文件相关
来源:互联网 发布:拳皇13优化 编辑:程序博客网 时间:2024/05/17 09:26
javascript 脚本读取
<script type="text/javascript">
function CreateXMLHttpRequest(){
try {
xmlHttp = new ActiveXObject("Microsoft.XmlHttp");
}
catch (e)
{
xmlHttp = new XMLHttpRequest();
}
}
CreateXMLHttpRequest();
xmlHttp.open("get","aHandler.ashx?MAP=123455&MAP1=yyyyyy",false);
xmlHttp.Send(null);
var ls=xmlHttp.responseText;
alert(ls);
</script>
C#读取
string url = Request.Url.ToString().Substring(0,Request.Url.ToString().LastIndexOf("/")+1) + "aHandler.ashx?MAP=cs&MAP1=sc";
WebRequest req = WebRequest.Create(url);
WebResponse res = req.GetResponse(); // GetResponse blocks until the response arrives
Stream ReceiveStream = res.GetResponseStream(); // Read the stream into a string
StreamReader sr = new StreamReader(ReceiveStream);
string resultstring = sr.ReadToEnd();
Response.Write(resultstring);
aHandler.ashx
string a = context.Request.Params["MAP"]; //获取参数
string b = context.Request.Params["MAP1"];
context.Response.ContentType = "text/plain";
context.Response.Write(a+b);
- ashx文件相关
- ashx文件
- *.ashx文件
- *.ashx文件
- ashx文件
- ashx文件
- ashx文件
- .ashx 文件
- ashx文件
- ashx文件
- Ashx 文件
- ashx文件
- 创建安全的ashx文件,ashx编译
- 创建安全的ashx文件,ashx编译
- ashx是什么文件
- ashx文件和HttpHandler
- ashx文件和HttpHandler
- ashx文件和HttpHandler
- 毕业设计
- Dwr的同步设置
- SQL自我复制数据
- 深入理解JVM内幕:从基本结构到Java 7新特性
- Asp.Net MVC3 详解Request Processing Pipeline
- ashx文件相关
- 字符串匹配
- 复习链表操作
- 一个查询窗口并行运行SQL脚本
- 在向服务器发送请求时发生传输级错误。 (provider: TCP 提供程序, error: 0 - 远程主机强迫关闭了一个现有的连接。) ---> System.Data.SqlClient.Sql
- <iOS>网络编程(三)SOAP, WSDL, Web Service
- Windows NT 内核基本结构和特征
- 表格列td自适应内容宽度
- NOR flash和NAND flash区别,RAM 和ROM区别