Forum Moderators: open
I a have a big problem and I don't know how to solve it..
I have an asp page (that contains some querys to a sql db) and I need to generate an html file (that will be saved in a server folder)that contains the content of the asp page output.
Is there possible?
If yes, is there anyone that could help me?
Thank you very much in advance,
Alex
You can write an ASP page using similar code to your existing page, but instead of response.write'ing the data you save the output as a text file using FSO.
You probably won't want to build a massive string of the whole page's HTML, so you could instead have a static HTML page with an include for the data generated from the database. Here you just use FileSystemObject to generate the include file.
Or you could use a template file with delimiter(s) where you want to put the database data. Load the template with FileSystemObject, do a simple string replace swapping the delimiters for the data and then save the whole page using FileSystemObject
Look up FileSystemObject for more info. HTH.