| 12:04 pm on Feb 28, 2006 (gmt 0)|
Look into using VBScript's FileSystemObject to create an output file which you can save your data to. Once it's saved, you can then paste that code into your site file.
| 12:29 pm on Feb 28, 2006 (gmt 0)|
I already know that this is possible... Actually I wanted to know if it is possible to do this without having to save every line in a text file.
Hm... I thought about using the server.buffer object. Is there a possibility to get access to the information which is cashed in this buffer object?
| 12:37 pm on Feb 28, 2006 (gmt 0)|
You could save the HTML as a string in the Application object.
You probably don't want to save the html as an actual page because this means giving IUSR_computername (the anonymous browser account) write permissions in a directory
| 12:44 pm on Feb 28, 2006 (gmt 0)|
you're right. I dont wanna give anyone write-permissions for the server...
Hm if I would do it the way you propose, I would have to change the string in the application object manually everytime I made some changes/updates to the asp file right?
I'd like to realiz it the way that the static html code is always loaded especially anyone who has admin-rights changed something in the database. In this case the .asp script should run again and the new string should be saved as static html until the next changes. etc
| 1:54 pm on Feb 28, 2006 (gmt 0)|
Are you running SQLServer? You could have an exec in SQL Server that runs a Visual Basic program that writes the HTML page. That way you just need to give the SQLServer Agent some write permissions.
| 4:25 pm on Feb 28, 2006 (gmt 0)|
Second what iguana sez... I've got a couple of sql server tasks that build static web pages for me every hour. Those static files get wrapped with the standard template and nobody ever knows the difference.
| 5:41 pm on Feb 28, 2006 (gmt 0)|
Why not use wget to save the page to a html file?
| 2:47 am on Mar 1, 2006 (gmt 0)|
|You could save the HTML as a string in the Application object. |
If this is alot of data, the Application Object was not intended to be used as a repository for a 'large amount of data'. How much data are we talking about?
If there is alot of data (MB's?) What's taking the most time?
1) Reading the Data from DB
2) Rendering the HTML
3) Downloading the text (how much content? MB's?)
The reason I ask is if your SQL read is taking more than a few seconds, then there's a design issue in the Database, perhaps simply an Index needs to be added to a table. SQL can return thousands of results from multi-million record tables very quickly if they are designed and indexed properly.
If the rendering the HTML is taking too much time then Caching ASP Content [msdn.microsoft.com] will do what you need.
If you are downloading 2MB worth of text then your 30-40 second rendering is slow due to the amount of data you are pushing to the client.
Have you done a diff on the Ticks at the beginning of the page and then at the end (ie: how long process/rendering takes).