When we write the ASP code, everyone knows the data that can get the FORM form with POST or GET, then how do we get the data on other pages? This should be used by the XMLHTTP protocol. XMLHTTP is part of XMLDOM technology.
The following code is a very simple example, we use XMLHTTP technology, completely acquire the code of http://www.codetoad.com/-site home page, and output it in the page.
<% DIM Objxmlhttp, XML set XML = Server.createObject ("Microsoft.xmlhttp") XML.Open "get", "http://www.codetoad.com/", False 'Pull The Data From The Web Page XML. Send
Response.write "Here's the html we now have in our xml object" Response.write "
" Response.Write "
Here is another example
<% DIM ObjHTTP, Objxml, ObjxSlset Object ("Microsoft.xmlhttp") Objhttp.Open "get", "http://p.moreover.com/cgi-local/Page?c=pop Music% 20REVIEWS & O = XML ", falseobjhttp.send.com Objxml = Objhttp.responsexmlset Objxsl = Server.createObject (" Microsoft.xmLDom ") objxsl.async = false
Objxsl.load (Server.MAppath ("style.xsl")))
IF (objxsl.parseerror.errorcode = 0) Then response.write (objxsl)) Else Response.write "error:" & objxsl.parseerror.reason & "URL:" & objxsl.urlend
Set objhttp = NothingSet objxml = NothingSet objxsl = nothing%>
Style.xsl: