ASP 101 - Active Server Pages 101
The Place ASP Developers Go!

Please visit our partners

Windows Technology Windows Technology
15 Seconds
ASP 101
ASP Wire
VB Forums
VB Wire
internet.commerce internet.commerce
Partners & Affiliates

ASP 101 is an site
ASP 101 is an site
Internet Lists
Internet News
Internet Resources
Linux/Open Source
Personal Technology
Small Business
Windows Technology
xSP Resources
Corporate Info
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash
your e-mail address:

 Top ASP 101 Stories Top ASP 101 Stories
VBScript Classes: Part 1 of N
Migrating to ASP.NET
Getting Scripts to Run on a Schedule

Make Your Site's RSS Feed Shine
Show All Tips >>

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
    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>"
  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=''>Mallard Design Company</a></font>")
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

Author: T.Mallard, Seattle, WA
Copyright 1999 Thomas Mallard, USA


Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback

JupiterWeb networks:

Search JupiterWeb:

Jupitermedia Corporation has two divisions: Jupiterimages andJupiterWeb

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers