Grab HTML

D

David Taylor

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?

TIA
David
 
B

Bob Barrows

David said:
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?

TIA
David

http://www.aspfaq.com/show.asp?id=2173

HTH,
Bob Barrows
 
E

Evertjan.

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,"<","&lt;")
t=replace(t,VbCrLf,"<br>")

response.write t

set xmlhttp = nothing

%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top