T.Mallard
Using ASP to Create a Website from Spreadsheets Continued
while not rsInput.EOF if isnull(rsInput(“note1“)) then
end if |
Next step is the basic product page, which has auto-numbering and link navigation created as a part of the build process. This first section of code just arranges the auto-numbering for this. The next opens a new output file, then opens the tables needed to produce a page between chunks of html. The finished page here is a first pass of many passes before all the keywords are inserted and the page is ready to publish. The database is within the web server’s scope so has read/execute/script permissions set under IIS4, and the folder is shared for protection using the machine account under win98/NT4.
set rsInput = server.createobject(“ADODB.Recordset“) rsInput.open “content”, conn1, 2, 3, 2 rsInput.movefirst lines = 1 while not rsInput.EOF if not isnull(rsInput(“prod_model”)) then series = series + 1 lines = lines + 1 if series 100 then if series 10 then htmlOut = “x:websharewwwrootgnsv1prod_00” & series & “.html“ sNext = series + 1 htmlNext = “prod_00” & sNext & “.html“ if series > 1 then sPrev = series – 1 htmlPrev = “prod_00” & sPrev & “.html“ end if else htmlOut = “x:websharewwwrootgnsv1prod_0” & series & “.html“ sNext = series + 1 htmlNext = “prod_0” & sNext & “.html“ sPrev = series – 1 if sPrev = 9 then htmlPrev = “prod_009.html“ else htmlPrev = “prod_0” & sPrev & “.html“ end if end if else htmlOut = “x:websharewwwrootgnsv1prod_” & series & “.html“ sNext = series + 1 htmlNext = “prod_” & sNext & “.html“ if series = 1 then htmlPrev = “prod_001.html“ else sPrev = series – 1 if sPrev = 99 then htmlPrev = “prod_099.html“ else htmlPrev = “prod_” & sPrev & “.html“ end if end if end if filename = mid(htmlOut, instr(htmlOut, “prod_“)) response.write(“filename: ” & filename & “ “) |
Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved
Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.