If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Saving File to Server

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-08-04, 10:25
efilipe efilipe is offline
Registered User
 
Join Date: Mar 2004
Posts: 1
Saving File to Server

Hi All,

What Iīm trying to do is, after the page is printed in users IE, it saves the HTML page in the server.

Doing something like this, itīs just too much ugly for my code:

-----------------------
Set fs = CreateObject("Scripting.FileSystemObject")
Set stream = fs.CreateTextFile(Server.MapPath( "\teste.html" ))
stream.Write "Line1"
stream.Write "Line2"
stream.Close
-----------------------

Isnīt there a way to save the whole thing in a file?
I got something like this, and it works for external sites.

-----------------------
Dim objIE, fs, stream
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Visible = True
objIE.Navigate("http://www.google.com")
Do While objIE.Busy
Loop
Do While objIE.Document.readyState<>"complete"
Loop
'
Set fs = CreateObject("Scripting.FileSystemObject")
Set stream = fs.CreateTextFile(Server.MapPath( "\teste.html" ))
stream.Write objIE.document.body.innerHTML
stream.Close
------------------

I want to do the exact thing in the current page!

Thanx,
eddie...
Reply With Quote
  #2 (permalink)  
Old 03-09-04, 10:03
robbied111 robbied111 is offline
Registered User
 
Join Date: Jan 2004
Location: Bermuda
Posts: 40
Re: Saving File to Server

Eddie:

Have you tried the XMLHTTP object?

RobbieD
__________________
Sunny Times...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On