SHARE
Facebook X Pinterest WhatsApp

Developing from Chaos Page 9

Jul 20, 2010
ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More



T.Mallard

Using ASP to Create a Website from Spreadsheets Continued

Section of a product pricing page.
The result is the table listing on the left has the links to the product pages. Then there are the indexes, and below are the main index/homepage loops to create some drop-down select boxes on the page. From all of these, I hope it’s obvious that these pages were easy to code, taking about the standard business week to finalize working on it between other things. Now, as things change, it takes a half-hour to create and publish the website from scratch. It has better navigation than the historical website, and a better clarity of the relationships between the products by using the database.

 


output.writeline(“ name=””prodtype””>“)
set conn1 = server.createobject(“ADODB.Connection“)
conn1.open “Provider=Microsoft.Jet.OLEDB.3.51; Data Source=X:websharewwwrootgnscgigns_01.mdb“
set rsInput = server.createobject(“ADODB.Recordset“)
rsInput.open “product“, conn1, 2, 3, 2
rsInput.movefirst
ptype = rsInput(“prod_type“)
pmodel = rsInput(“prod_model“)
pgroup = rsInput(“prod_group“)

while not rsInput.EOF
lines = lines + 1
if (lines = 1) then
  output.writeline(“” & rsInput(“prod_type_page“) & ““”>” & lcase(rsInput(“prod_type“)))
  end if
if rsInput(“prod_type“) = ptype then
  ptype = rsInput(“prod_type“)
  pmodel = rsInput(“prod_model“)
  pgroup = rsInput(“prod_group“)
  rsInput.movenext
else
  output.writeline(“” & rsInput(“prod_type_page“) & ““”>” & lcase(rsInput(“prod_type“)))
  ptype = rsInput(“prod_type“)
  pmodel = rsInput(“prod_model“)
  pgroup = rsInput(“prod_group“)
  rsInput.movenext
end if
wend

output.writeline(“  “)
output.writeline(““)
rsInput.movefirst
ppage = rsInput(“prod_page“)
pgroup = rsInput(“prod_group“)
lines = 0
output.writeline(“” & rsInput(“prod_group_page“) & ““”>” & lcase(rsInput(“prod_group“)))
response.write(“moved first
“)
while not rsInput.EOF
lines = line + 1
if (rsInput(“prod_group“) = pgroup) then
  response.write(“equals: ” & rsInput(“prod_group“)
& “
“)
  ppage = rsInput(“prod_page“)
  pgroup = rsInput(“prod_group“)
  rsInput.movenext
else
  output.writeline(“” & rsInput(“prod_page“) & ““”>” & lcase(rsInput(“prod_group“)))
  ppage = rsInput(“prod_page“)
  pgroup = rsInput(“prod_group“)
  rsInput.movenext
end if
wend
output.writeline(“  “)

This flow started with Excel files having text and numeric data mixed which was hand pasted into Access table fields created with wizards to establish a database to build an entire website from, including auto-numbered paging, next-previous buttons, and indexes to the two main divisions of product type. The original html pages were used to create keyword lists for each product page which were then added back into the page. And, the main homepage is also built from the database.

Recommended for you...

What Is a Container? Understanding Containerization
What Is a Print Server? | How It Works and What It Does
Nisar Ahmad
Dec 8, 2023
What Is a Network Policy Server (NPS)? | Essential Guide
Virtual Servers vs. Physical Servers: Comparison and Use Cases
Ray Fernandez
Nov 14, 2023
ServerWatch Logo

ServerWatch is a top resource on servers. Explore the latest news, reviews and guides for server administrators now.

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.