Tutorial: Writing and attaching Compile Time script to a file(s).
This Compile-time script (CTS) sample generates HTML pages using the project files as templates. 

The CTS scripts are two and are designed to be used together, but there is no problem to use them separately:

Tutorial2ItemListGen - Generates listing/index pages for the records in the DB. Query, MDB file and the page size can be configured. The generated files are indices and every item listed in them can point to a page generated for the record by the other script (see below). Template syntax is:
<CUSTOM ID="LIST">
    ... HTML code ... <%=Field_Name%> ... HTML code ... <%=Field_Name%>
</CUSTOM>

The code above is repeated for every row. Field_Name can be any field name returned by the query. If the field does not exist an error will be returned.
Also the following two tags could be included outside the above tag:
<CUSTOM ID="PREV"></CUSTOM>
and
<CUSTOM ID="NEXT"></CUSTOM>
They will be replaced with links to the previous and next page in the list. The records on each page is the page size specified in the configuration.
Generated pages are named:
filenameX.ext
Where filename is the original file name of the file in the project and ext is its extension. X is the page number (1 - based)
To use this CTS you should use ASPToASP processing option even if files are plain HTML.

Tutorial2ItemPageGen  - Generates a page for each record returned by the configured query performed over the MDB file specified. Template syntax is:
Any number of tags like this:
<CUSTOM FIELD="Field_Name"></CUSTOM>
Replaced with the content of the field Field_Name from the record. If the field does not exist in the record - warning message is issued.
<CUSTOM TYPE="IMAGE" FIELD="Field_Name"></CUSTOM>
Improved version of the above. If the value in the DB is empty this will be replaced with "No  Image" text if it is not empty an <IMG> tag will be generated with SRC equal to the DB field

<CUSTOM ID="PREV"> </CUSTOM>
and
<CUSTOM ID="NEXT"> </CUSTOM>
Will be replaced with links to the previous and next page.