Tutorials to .com

Tutorials to .com » Asp » Fso » No template, only ASP + FSO to generate static HTML pages of a method

No template, only ASP + FSO to generate static HTML pages of a method

Print View , by: iSee ,Total views: 7 ,Word Count: 287 ,Date: Thu, 16 Apr 2009 Time: 4:46 AM

fso to generate static HTML document template tags to replace has been a very troublesome problem, at least I think so, and also other things to make a template, trouble! I have noted there is a way to solve this problem

Index.asp as a normal page, and use asp code out of the contents of the database, and the other to build a makehtml.asp pages, add a textarea field, assumed to be name = "body", will be transferred in index.asp in textarea out, such as:
<textarea name="body"> <!--# include file = "index.asp "--></ textarea>, will be included in the form of the textarea in the form to receive pages to use to create FSO object, as generated index.html file!

filename ="../ index.html "
if request ( "body ")<>"" then
set fso = Server.CreateObject ( "Scripting.FileSystemObject")
set fout = fso.CreateTextFile (server.mappath ( "" & filename &""))
fout.write request.form ( "body")
set fout = nothing
set fso = nothing
end if

This index.html file generated, and even do not need templates, as long as the normal use of the ASP file to read to a textarea where you can, the problem has not yet been found! Of course, to support the premise that the server FSO

ASP File System Object Articles

Can't Find What You're Looking For?

Rating: Not yet rated


No comments posted.