Capturing ASP Output

Results 1 to 2 of 2

Thread: Capturing ASP Output

  1. #1
    Join Date
    Dec 1969

    Default Capturing ASP Output

    Does anyone know a good way to capture the output of an ASP page (i.e., the pure HTML a client would see)? I need to keep session state and support SSL. The ultimate goal is to save the output to a file as well as pushing it back to the client. I&#039ve looked into emulating a client (ASPTear, AspHTTP) to not much avail. Any ideas?<BR><BR>-Dave

  2. #2
    Ian Stallings Guest

    Default RE: Capturing ASP Output

    This would be a pain in the %#$% but if you write<BR>the entire page including &#060;html&#062; tags etc<BR>you could store this in a variable like so:<BR><BR>strTemp = strTemp & "&#060;html&#062;&#060;head&#062;&#060;/head&#062;&#060;body&#062;"<BR>strTemp = strTemp & Data & "&#060;/body&#062;&#060;/html&#062;"<BR><BR>you could then write this to a text file using:<BR><BR>strFile = Server.MapPath("filename.txt")<BR>Set FileObj = Server.CreateObject("Scripting.FileSystemObject")< BR>Set OutStream = FileObj.OpenTextFile(strFile, 8, TRUE)<BR>Outstream.WriteLine(strTemp)<BR>End If<BR><BR>it will work, it&#039s just a pain to write the entire page.<BR>I hope this helps :)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts