ASP Developing for Academic and Business Processes Utilizing ASP in Systems Development Case: Develop a Research Library Website from Scanned Input
Next is the heart of the loop for data, when the line count gets to 41, it inserts the coding to begin a new column or falls into the standard loop and outputs a line. It also adds the topic to the meta tags list on the way through the loop. As with most coding, the end conditions are what take all the work. Each field is trimmed as it's used, and the string is output. For dynamic content creating a table won't allow the client to see anything until the table is closed, but here it's being used for file creation so is not important.
if paging = 41 then
output.writeline("</td><td>") else if trim(rsInput.Fields("topic")) <> "" then
metatopics = metatopics &trim(rsInput.Fields("topic"))& ";" end if
aline = trim(rsInput.Fields("topic"))& " " & trim(rsInput.Fields("subtopic"))& " " if trim(rsInput.Fields("pages")) <> "" then
aline = aline & "-- " & trim(rsInput.Fields("pages"))& "<br>" else
aline = aline & "<br>" end if
aline = "" end if
And then finishing the page after it runs out of input...
if rsInput.EOF then
paging = 81
output.writeline("<p><center><table cellpadding=4 cellspacing=2 width='10%'><tr><td align=center bgcolor=silver><a href='" & htmlPrev & "'><font face='Comic Sans MS' size='4'>Previous</font></a></td><td align=center bgcolor=silver><a href='csfa_001.html'><font face='Comic Sans MS' size='4'>Start</font></a></td>")
output.writeline("<font size=1>Dynamic Content Resources by<br><a href='http://www.mallard-design.com/'>Mallard Design Company</a></font>")
output.close end if
At this point, the page is full and the meta tag list is ready to output to a file for adding to the page on the second pass. The was a conscious choice, in other cases it would be better to store the page and add the list as final output. In this case a lot of the entries have commas, which need replacement before the topic can be used as a meta tag keyword. It's simpler here to open the finished file and globally change the entries into meta tag format and then paste them into the page.
Previous versions of VBScript are CaseSensitive, this is written for the latest version.
Development Test System: Windows98, PentiumII 200MHz 128Mb
Personal Web Server 4.0 (IIS4), SQL7b3, Personal Oracle, Sybase