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?
julio_expAsked:
Who is Participating?
 
mouattsConnect With a Mentor Commented:
If you obtain the IIS Rersouce Kit (from Microsoft) it includes on the CD the software that grabs the HTML produced by from the ASP so that it can be cached.

I presume that this is done by writing an ISAPI DLL that hooks into the HTML/ASP parsing (this is how you would do this sort of thing on most other servers).

Steve
0
 
Patricia080698Commented:
what do you want to record in your asp file ? be a more specifique please.
0
 
vendrigCommented:
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?
0
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

 
julio_expAuthor Commented:
Patricia, Were are you from?

Necesito capturar el código HTML generado por ASP.DLL para guardarlo en un file.
0
 
vendrigCommented:
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.
0
 
AnitaPCommented:
julio_exp : please explain a bit more what you want to do.
0
 
vendrigCommented:
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;-)
0
 
julio_expAuthor Commented:
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.


0
 
vendrigCommented:
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.

0
 
julio_expAuthor Commented:
I not want save all html code in intermediate variable.
This is very difficult
0
 
vendrigCommented:
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.
0
 
julio_expAuthor Commented:
IIS3 or 4 ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.