Eric的使用XMLHTTP从服务端取得数据演示
2004-09-02 23:49
274 查看
使用XMLHTTP从服务端取得数据
在服务器直接使用Request.Form取值, 不需要另外解码编的, 无中文显示问题
适用于所有CGI服务端
服务端代码: ASP.NET with C# 版, 改成其它版本很容易, 我就不浪费时间了:]
<%@ Page Language="C#" %>
<%
string result = "";
for(int i = 0; i < Request.Form.Count; i++)
{
result += Request.Form.GetKey(i) + "=" + Request.Form.Get(i) + "&";
}
if(result == "")
{
result = "Empty Request!";
}
else
{
result = result.Substring(0, result.Length - 1);
}
Response.Write("Server Requested: " + result);
%>
在服务器直接使用Request.Form取值, 不需要另外解码编的, 无中文显示问题
适用于所有CGI服务端
服务端代码: ASP.NET with C# 版, 改成其它版本很容易, 我就不浪费时间了:]
<%@ Page Language="C#" %>
<%
string result = "";
for(int i = 0; i < Request.Form.Count; i++)
{
result += Request.Form.GetKey(i) + "=" + Request.Form.Get(i) + "&";
}
if(result == "")
{
result = "Empty Request!";
}
else
{
result = result.Substring(0, result.Length - 1);
}
Response.Write("Server Requested: " + result);
%>
相关文章推荐
- asp.net服务端使用正则表达式验证数据合法性.
- Asp使用XMLHTTP方式上实现数据抓取!
- ASP中使用XMLHTTP读取远程数据2
- ASP中使用XMLHTTP读取远程数据3
- ASP中使用XMLHTTP读取远程数据2
- 使用DetailsView的数据插入功能时,如何初始化参数,如何取得新纪录的主键(主键类型为uniqueidentifier)
- Eric的数据分页(演示+代码)
- JST+JSON+AJAX——使用客户端js模版代替服务端数据绑定
- ■ASP中使用XMLHTTP读取远程数据3
- JST+JSON+AJAX——使用客户端js模版代替服务端数据绑定
- sql server2000中使用convert来取得datetime数据类型样式(全)
- xmlhttp出现“数据还不可使用”错误
- 使用XMLHTTP发送超长XML表单数据
- ASP中使用XMLHTTP读取远程数据3
- xmlhttp:演示后台POST一个XML数据流到数据库的示例
- 使用XMLHTTP发送超长XML表单数据
- Jsp中使用xmlhttp进行数据交互~
- 使用XMLHttp和ADODB.Stream取得远程文件并保存到本地
- Jsp中使用xmlhttp进行数据交互~
- ASP中使用XMLHTTP读取远程数据1