当前位置 : 主页 > 网络编程 > ASP >

如何在Classic ASP中将数据发布到Web中的任何页面?

来源:互联网 收集:自由互联 发布时间:2021-06-24
如何在Classic ASP中将数据发布到Web中的任何页面? 我建议在XmlHttp上使用Server XMLHTTP,原因如下: XMLHTTP is designed for client applications and relies on URLMon, which is built upon Microsoft Win32 Internet (Win
如何在Classic ASP中将数据发布到Web中的任何页面? 我建议在XmlHttp上使用Server XMLHTTP,原因如下:

XMLHTTP is designed for client
applications and relies on URLMon,
which is built upon Microsoft Win32
Internet (WinInet). ServerXMLHTTP is
designed for server applications and
relies on a new HTTP client stack,
WinHTTP. ServerXMLHTTP offers
reliability and security and is
server-safe.

http://support.microsoft.com/kb/290761

例:

DataToSend = "id=1"
    dim xmlhttp 
    set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
    xmlhttp.Open "POST","http://localhost/Receiver.asp",false
    xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    xmlhttp.send DataToSend
    Set xmlhttp = nothing
网友评论