Create a paging program using ASP

Source: Internet
Author: User
Create a paging program using ASP
Wodeail · CPCW
    
Are you worried about the tedious work of repeatedly linking previous pages and next pages for the sake of too many articles on your site? Now with ASP, as long as your homepage Supports ASP, you can easily manage the articles. Sorting, linking, and displaying all these tasks can be done by ASP! Would you like to give it a try if it is so easy to maintain the home page?
    
See the following code for implementing the ASP paging program:
    
<Anguage = "vbscript"
    
Dim conn
    
Dim connstr
    
Dim totalPut
    
Dim CurrentPage
    
Dim TotalPages
    
Dim I, j
    
Dim SQL
    
Dim rs
    
On error resume next
    
'Open the database
    
Connstr = "DBQ =" + server. mappath ("book. mdb") + "; DefaultDir =; DRIVER = {Microsoft Access Driver (*. mdb )};"
    
Set conn = server. createobject ("ADODB. CONNECTION ")
    
Conn. open connstr
    
Set rs = server. createobject ("adodb. recordset ")
    
'Defines the number of entries displayed on each page
    
Const MaxPerPage = 18
    
If not isempty (request ("page") then
    

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.