Link to home
Start Free TrialLog in
Avatar of julio_exp
julio_exp

asked on

Get HTML code from server

How can I get the HTML code at the end of an ASP from the server's buffer in order to be able to record it in a file on the Server?
Avatar of Patricia080698
Patricia080698

what do you want to record in your asp file ? be a more specifique please.
You can write all your HTML code to a string variable (your own buffer). At the end you save that string to a file using the filescriptingobject. Then you do a Response.write(string).
Does this help you?
Avatar of julio_exp

ASKER

Patricia, Were are you from?

Necesito capturar el código HTML generado por ASP.DLL para guardarlo en un file.
Julio, it appears you want to do exactly what I told you. Only question is if you want to send to the client the entire result at once, or in chunks.
julio_exp : please explain a bit more what you want to do.
AnitaP: I don't know if he speaks Spanish or Portuguese, but fortunately I learnt Latin;)
"It's necessary to capture the HTML code generated by the ASP DLL to save it on file."
I think he wants to have an archive of pages shown to user. Don't ask why;-)
After a complicates steps, a customer make a list of items.
I need this page: saved in a file.
Then I mail it to customer as a html file.


Be careful: don't confuse client (customer) and server (ASP/mail)!
So you have variables that contain the choices of the customer. Also, you can make an HTML file of them. That's what you got so far, right?
Instead of writing the HTML directly to the client, save it to a string (e.g. result = result & "<B>100</B>"). When finished, you write the entire string to file. Then you can mail that file or do with it whatever you want.
If that's what you want, but you don't know how to write the resulting string to a file on your server by way of ASP, ask me here.

ASKER CERTIFIED SOLUTION
Avatar of mouatts
mouatts

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I not want save all html code in intermediate variable.
This is very difficult
Of course you have the right to not want to save the code in an intermediate variable, but it's not difficult at all. In fact, I always store the code in a variable, because it's easier to debug and mix in other variables.
The advantage of this approach is that you can execute the mail component from the very same page.
IIS3 or 4 ?