Forum Moderators: open

Message Too Old, No Replies

Saving ASP server response?

         

hveld

12:08 pm on Jul 3, 2003 (gmt 0)

10+ Year Member



Is it possible to save the response generated by the ASP (not-.Net) server and sent back to the requesting browser?
Like to save it as .htm/.txt file, or pass it to some application?

thanks

chris_f

10:10 am on Jul 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Im not quite sure what your ask. Can you please clarify or give a not too specific example.

ATOB
Chris

MetaFunk

10:18 am on Jul 4, 2003 (gmt 0)

10+ Year Member



If you want to do this for your own script then you will have to code it. e.g.
save all output in a string variable

strWebPage = "Hello"
strWebPage = strWebPage & " - World"

and then do

response.write strWebPage and then you can also save it somewhere else.

G,

hveld

10:46 am on Jul 7, 2003 (gmt 0)

10+ Year Member



chris_f, I need to save to a file or send to another program the code that the asp server sends back to the browser.
If you have an asp file that looks like
<html>response.write("hello")</html> the server will send to the browser this
<html>hello</html> - that's the code I want to save(on the server)

What MetaFunk suggest seems to be the only possibility but VB is not good at concatenating strings - I'm afraid this will affect the server's performance

mattur

10:56 am on Jul 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can use the FileSystemObject to create and write directly to files. You would have to re-write your ASP page to build the file content, instead of returning it to the response object.

You could use a template with field delimiters and simple Replaces to build the content without having to do loads of concatenating. HTH.

killroy

11:29 am on Jul 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



create another ASP script to do a GET on the server and save teh result. I do that all the time in my scripting language, but I'm not into ASP so I can't give you the syntax.

SN

RossWal

7:09 pm on Jul 7, 2003 (gmt 0)

10+ Year Member



I like Killroy's idea. You would probably use the XMLHTTP object from Microsoft to do the get. Search on MSDN for info. I don't know whether XMLHTTP will provide you with accesss to the HTTP headers if that's important.

Ross