Pagination | control | So far, the work we've done just shows the record.
If we were to add, delete, and modify records in this ASP page, the new problem would come.
This is often encountered when we design programs similar to those that allow users to manage their own address books.
Luckily we've made all the preparations in front of the paging control, and now we just need to do the following:
1. Add a checkbox before each line record
2. Add the "Select All Records" check box, delete, add button below the list of records
If you display a list of categories in query control, you also add the Category Settings button.
Of course, we just need to modify the Listrecords () function and the Listrecordscon.inc file
Please see sample5.asp
< a > ASP files that require paging
Sample5.asp
<!--#include file= ". /inc/functions.inc "-->
<%
'//////////////////////////////////////////////////////////
'
' Define table name
'
'//////////////////////////////////////////////////////////
Thetablename= "AddressBook"
'//////////////////////////////////////////////////////////
'
' Query criteria
'
'//////////////////////////////////////////////////////////
Thequeryfield = "FLD" & Thetablename & "_nickname" query field, full name
Thequerytitle = "nickname" Field display title
thequerytable = Table with VW & Thetablename field, full name
Thequeryclass = thetablename & "_class" category table name, remove TBL, VW prefix
Theclassid = C2int (Request ("ClassID")) ' Current category number
' If this is a query pattern, then construct a fuzzy query statement
If request ("mode") = "Query" Then
%><!--#include file= ". /inc/control/query_result.inc "--><%
Else
' Otherwise ignore
Thequerycon = "1>0"
End If
'//////////////////////////////////////////////////////////
'
' Restrictive conditions
'
'//////////////////////////////////////////////////////////
Thelimitcon = "FLD" & Thetablename & "_userid=" & Session ("UserID")
If Theclassid > 0 Then
Thelimitcon = Thelimitcon & "and fld" & Thequeryclass & "Id=" & Theclassid
End If
'//////////////////////////////////////////////////////////
'
' Construct the SQL statement
'
'//////////////////////////////////////////////////////////
Usql = "SELECT * from" & thequerytable & "where" ("& Thequerycon &") and ("& Thelimitcon & " ) "
%>
<!--#include file= ". /inc/control/navigator_init.inc "-->
<title>test</title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<link rel= "stylesheet" href= ". /default.css "type=" Text/css ">
<!--your HTML code//-->
<table width= "100%" border= "0" cellspacing= "0" cellpadding= "0" >
<tr>
&n