Execute an ASP and output into a string

Discussion in 'ASP General' started by Ed, Aug 11, 2004.

  1. Ed

    Ed Guest

    Suppose there is a page at http://mysite.com/schedule.asp

    Is there a way for me to write an ASP program which loads
    http://mysite.com/schedule.asp into a string? That is, instead of
    outputting directly to a browser, it outputs to a string?

    So, the expected result of the string would be:

    strScheduleASP = "<HTML><HEAD>........</BODY></HTML>"

    Thanks.
     
    Ed, Aug 11, 2004
    #1
    1. Advertising

  2. http://www.aspfaq.com/2173

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "Ed" <> wrote in message
    news:eQEUNe#...
    > Suppose there is a page at http://mysite.com/schedule.asp
    >
    > Is there a way for me to write an ASP program which loads
    > http://mysite.com/schedule.asp into a string? That is, instead of
    > outputting directly to a browser, it outputs to a string?
    >
    > So, the expected result of the string would be:
    >
    > strScheduleASP = "<HTML><HEAD>........</BODY></HTML>"
    >
    > Thanks.
    >
    >
     
    Aaron [SQL Server MVP], Aug 11, 2004
    #2
    1. Advertising

  3. Aaron [SQL Server MVP] wrote:
    >> Is there a way for me to write an ASP program which loads
    >> http://mysite.com/schedule.asp into a string? That is, instead
    >> of outputting directly to a browser, it outputs to a string?

    >
    > http://www.aspfaq.com/2173

    [on reading the contents of a remote web site]

    Two other things worth noting:

    (1) If there's no programmatic need for the text, you can manually grab the
    output with Notepad -- [File] + [Open] + {paste URL}

    (2) Noting your use of "mysite.com", I wondered if you really wanted the
    source for the entire ASP script (not just its output). If so, you probably
    want "Scripting.fileSystemObject" instead of "MSXML2.ServerXMLHTTP".
    http://msdn.microsoft.com/library/en-us/script56/html/fsooriScriptingRun-TimeReference.asp



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
     
    Dave Anderson, Aug 11, 2004
    #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. John Bokma
    Replies:
    5
    Views:
    5,186
    John Bokma
    Sep 10, 2003
  2. John Mott

    how to execute and capture .aspx output

    John Mott, Jan 11, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    2,189
    =?Utf-8?B?SGF2YWdhbg==?=
    Jan 11, 2006
  3. billiejoex

    execute commands and return output

    billiejoex, Sep 10, 2005, in forum: Python
    Replies:
    8
    Views:
    443
    billiejoex
    Sep 10, 2005
  4. James_Dean
    Replies:
    0
    Views:
    383
    James_Dean
    Nov 8, 2007
  5. Savas Ates
    Replies:
    1
    Views:
    298
    Patrice
    Aug 17, 2004
Loading...

Share This Page