Generate static page example by template
'/' Example produces a static page template 'Author: griefforyou' /
% TITLE% title> head> <<- - module file (template.htm)!> Body>% content% body> html> <% DIM FSO, F DIM STRTILE, STRCONTENT, STROUT 'Create a file system object set fso = server.createObject ("scripting .FilesystemObject ")" Open the web template file, read template content set f = fso.opentextfile (server.mappath ("template.htm")) strout = f.readall f.close start start = "This is the generated web title" StrContent = "This is the generated web content" '' Created by tag strout = Replace in the template with real content (strout, "% title%", startle) strout = replace (strout, "% content%", strcontent) creates The generated static page set f = fso.createtextfile (Server.MAppath ("new.htm"), true) 'Write web content F.WriteLine strout f.close response.write "Generates Static Page Success!"' Release File System Object Set f = Nothing set fso = nothing%>