Grab HTML

Discussion in 'ASP General' started by David Taylor, Nov 23, 2003.

  1. David Taylor

    David Taylor Guest

    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
    David Taylor, Nov 23, 2003
    #1
    1. Advertising

  2. David Taylor

    Bob Barrows Guest

    David Taylor wrote:
    > 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

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows, Nov 23, 2003
    #2
    1. Advertising

  3. David Taylor

    Evertjan. Guest

    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

    %>


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Nov 23, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2hhd24=?=

    How do I grab a session from the server by sessionID

    =?Utf-8?B?U2hhd24=?=, Feb 12, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    289
    Kevin Spencer
    Feb 13, 2004
  2. Darrel
    Replies:
    2
    Views:
    484
    Darrel
    Nov 14, 2004
  3. Alan Silver
    Replies:
    9
    Views:
    468
    Alan Silver
    Feb 16, 2005
  4. Íßêïò
    Replies:
    13
    Views:
    502
    Îίκος
    Aug 7, 2010
  5. Ed
    Replies:
    3
    Views:
    112
    kaeli
    Jul 29, 2004
Loading...

Share This Page