SHARE
Facebook X Pinterest WhatsApp

ASP Developing for Academic and Business Processes Page 3

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

With the connections open…


dim paging, aline, series, sNext, sPrev

while not rsInput.EOF
series = series + 1

The variable ‘series’ is a page counter, which begins with this while loop. Below is the code to create filenames and Next-Previous links.


for paging =1 to 80
if paging = 1 then
  if series 100 then
    if series 10 then

      htmlOut = “D:Websharewwwrootaspcsfacsfa_00” & series & “.html”
      sNext = series + 1
      if sNext = 9 then
        htmlNext = “csfa_010.html”

        else
        htmlNext = “csfa_00” & sNext & “.html”
      end if
    sPrev = series – 1
    htmlPrev = “csfa_00” & sPrev & “.html”

    else
    htmlOut = “D:Websharewwwrootaspcsfacsfa_0” & series & “.html”
    sNext = series + 1
    htmlNext = “csfa_0” & sNext & “.html”

    sPrev = series – 1
    if sPrev = 9 then
      htmlPrev = “csfa_009.html”
      else
      htmlPrev = “csfa_0” & sPrev & “.html”

    end if
    end if
  else
    htmlOut = “D:Websharewwwrootaspcsfacsfa_” & series & “.html”
    sNext = series + 1

    htmlNext = “csfa_” & sNext & “.html”
    if series = 1 then
      htmlPrev = “csfa_001.html”

      else
      sPrev = series – 1
      if sPrev = 99 then
        htmlPrev = “csfa_099.html”
        else
        htmlPrev = “csfa_” & sPrev & “.html”

      end if
    end if
  end if

Getting the Buttons Right.
This section of code above is mainly dealing with getting the automatic paging correct. As the records get processed, I use three digit auto naming so therefore must fill leading zeros for both the filename and for the Next-Previous buttons, so, it’s a lot of code for a simple idea. The results are buttons that work and files that sort sequentially by filename. Next is the head portion of the page, which will contain two columns of 40 entries each.

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.