使用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);
%>

博客介绍了使用XMLHTTP从服务端取得数据的方法,在服务器直接用Request.Form取值,无需额外解码编码,无中文显示问题,适用于所有CGI服务端,还给出了ASP.NET with C#版服务端代码示例。
1624

被折叠的 条评论
为什么被折叠?



