Of course it can, and it's very simple, today I'll teach you how to generate HTML static pages without templates in ASP.
This assumes that there is a htmer.asp dynamic page, you want to make it into an HTML static page htmer.html, then we first create a new ASP program file Htmer_to_ Html.asp (the file is used to make the htmer.asp dynamic page into a static page htmer.html), the specific code for htmer_to_html.asp is as follows:
Copy Code code as follows:
<form method= "POST" action= "" >
<textarea name= "asp2html" style= "Display:none" ><!--#include file= "htmer.asp"--></textarea>
<input type= "Submit" value= "Generate HTML page"/>
</form>
<%
Dim Filename,fso,fout
If Request.Form ("asp2html") <> "" Then
Filename= "Htmer.html"
Set fso=server.createobject ("Scripting.FileSystemObject")
Set Fout=fso.createtextfile (Server.MapPath (Filename))
Fout.write Request.Form ("asp2html")
Fout.close
Set fout=nothing
Set fso=nothing
End If
%>