David Taylor wrote on 23 nov 2003 in
microsoft.public.inetserver.asp.general:
I'm looking for a way to grab the HTML behind one of my pages and
display it to the user. The page I'm trying to get the HTML from is
an ASP page, so obviously I'm looking for the post-asp processing
results. Basically I want the same HTML that the user could get if
they had done a "View Source" in their browser on the page.
Does IIS/ASP provide a way to do this natively, or do I have to buy a
third party component?
<%
url = "http://www.mysite.org/mypage.asp"
' must be an external reference !
set xmlhttp = server.CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send ""
t=xmlhttp.ResponseText
' make a source displaying page
t=replace(t,"<","<")
t=replace(t,VbCrLf,"<br>")
response.write t
set xmlhttp = nothing
%>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)