How can I save the HTML as a file?

Results 1 to 2 of 2

Thread: How can I save the HTML as a file?

  1. #1
    judd gledhill Guest

    Default How can I save the HTML as a file?

    I was wondering if there was a way for me to intercept the final computed HTML that is generated from my ASP script. I want to be able to fill out a form, post it to a page that generates some new HTML based on the form data, then instead of sending it back to the browser, save it to a file.<BR><BR>Any thoughts?<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default FileSystemObject

    You need to have write permissions on the directory you are creating the new fle in<BR><BR>FileName="C:wwrootsomedomainsomedirector yThefile.html"<BR>VarHTML="YourprocessResults"<BR> <BR>set filesys=server.createobject("scripting.filesystemo bject")<BR>set txtfile=filesys.CreateTextFile(FileName)<BR>txtfil e.Write(VarHTML)<BR>txtfile.close<BR>set filesys=Nothing<BR>set txtfile=Nothing<BR>

Posting Permissions

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