|
Home > Archive > IIS ASP > August 2004 > Execute an ASP and output into a string
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Execute an ASP and output into a string
|
|
|
| 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] 2004-08-11, 5:56 pm |
| http://www.aspfaq.com/2173
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Ed" <eddiemarino@hotmail.com> wrote in message
news:eQEUNe#fEHA.216@tk2msftngp13.phx.gbl...
> 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.
>
>
| |
| Dave Anderson 2004-08-11, 5:56 pm |
| Aaron [SQL Server MVP] wrote:
>
> 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/e...meReference.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.
| |
| Brian Staff 2004-08-11, 5:56 pm |
| > 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>"
yes, you can execute client-side code or server-side code to execute an
HTTPRequest ("Microsoft.xmlHTTP") to http://mysite.com/schedule.asp and it will
return a string. Ordinarliy that string goes to the browser which then renders
the HTML, but ResponseText is a string which you can do what you want.
Brian
|
|
|
|
|