Just saw a netizen mentioned paging problem, think of the past in order to get a paging function to hurt the brain, now I will be divided into a page for the most simple effect, let everyone reference.
This section is to open the table and the elements of the assignment (eliminates the connection to the database operation, please resolve themselves):
Rs.Open sql,conn,1,1 ' Join table
Rs.pagesize=10 ' This is a few records per page showing 10 represents 10 pieces
PAGE=CLNG (Request ("page")) ' Ge
absolute path usage.5.1 use the di mechanism of spring to obtain files and avoid hard coding.Refer to the following connection content:Http://www.javajia.net/viewtopic.php? P = 90213 5.2 read configuration filesRefer to the following connection content:Http://dev.csdn.net/develop/article/39/39681.shtm5.3 read an XML file through a virtual path or relative path to avoid hard EncodingRefer to the following connection content:Http://club.gamvan.com/club/clubPage.jsp?
Pagedlistgotopageform. Which Pagedlistpager mainly provide "previous page, next page ..." This type of navigation (not know how to describe here), and Pagedlistgotopageform provides input page to click on a bar-like navigation mode, Pagedlistrenderoptions and Gotoformrenderoptions, respectively, ask them for configuration options.Pagedlistpager configuration optionsThe example above uses the default configuration options, Pagedlistrenderoptions also provides additional configuration options, in
absolute path use. (from the network)5.1 Use spring's di mechanism to get the file and avoid hard coding.Refer to the following connection content:http://www.javajia.net/viewtopic.php?p=902135.2 Reading of configuration filesRefer to the following connection content:Http://dev.csdn.net/develop/article/39/39681.shtm5.3 Read an XML file from a virtual path or relative path, avoiding hard-codedRefer to the following connection content:Http://club.gamvan.com/club/clubPage.jsp?
For the ASP language, to write a functional module as a class, that for efficiency, it is not necessarily a very advocated thing, but the modular to small to say, to write some functions as a function, that is, in the development of ASP, a lot of things, the following are some of the functions I often use, there are some I wrote, Some are found on the Internet, such as the CFS code, the network of CFS-encoded functions inside the variables are not declared, so after my page declared Option Expli
hard coding and absolute path of use. (From Network)
5.1 Use spring's di mechanism to get files and avoid hard coding.
Refer to the following connection content:
http://www.javajia.net/viewtopic.php?p=90213
5.2 Configuration file Read
Refer to the following connection content:
Http://dev.csdn.net/develop/article/39/39681.shtm
5.3 Read an XML file through a virtual path or relative path to avoid hard codingRefer to the following connection content:
Http://club.gamvan.com/club/clubPage.jsp?
://pagelet.mafengwo.cn/poi/pagelet/poiCommentListApi?callback=jQuery18105332634542482972_ 1511924148475params=%7b%22poi_id%22%3a%22{href}%22%2c%22page%22%3a{num}%2c%22just_comment%22%3a1%7d ' Get poi of each attraction
This is not a POST request. We don't have to go to one of the attractions to get the parameters, we can visit this site to find all the users, but the site's data is also dynamically loaded
Based on the above picture we can clearly see that we only need to pass the number of p
Stored Procedures | Pagination read a few friends wrote about the stored procedure pagination article, feel a bit of a problem. Starleee and the Oriental spider hope I can make a point, I simply say.
The first is that the Allsky of the paging method is not tenable at all, see he is like this:
Select @iStart = (@iPage-1) * @iPageSize
Select @iEnd = @iStart + @iPageSize +1
That is, his start and end IDs are calculated on a per-page basis, and it is nec
current page
For ipage = 1 to Rs. PageSize//
Response.Write "Response.Write "Response.Write "Rs. MoveNext
If Rs. EOF Then Exit for
Next
Response.Write "The second type: Form transfer parameter method
This method is the same as the first when creating a Recordset object, except that when the page is controlled, the page is implemented with
If Pagenum = "" Then pagenum = 1//Starting from first page
Establish the database connection and the Recordset
"Response.Write "Looping through each record
Rs. AbsolutePage = page//Assign page number to AbsolutePage property to know the first record number of the current page
For ipage = 1 to Rs. PageSize//
Response.Write "Response.Write "Response.Write "Rs. MoveNext
If Rs. EOF Then Exit for
Next
Response.Write "The second type: Form transfer parameter method
This approach is the same as the first when creating a Recordset object, except that the If Pagenum =
pages), and the AbsolutePage (current page number) property to control the paging output. Pagination uses the
direct page numbering method to control page-flipping. The name of the Web page is emp1.asp. The source code is as follows:
Set conn = Server.CreateObject ("ADODB. Connection ")Conn. Open "Driver={microsoft Access driver (*.mdb)};d Bq=employee.mdb"Create the Recordset object instance RS for the EMP table.Set rs = Server.CreateObject ("ADODB.") Recordset ")Rs. Open "EMP", Con
= {Microsoft Access Driver (*. mdb)}; DBQ = employee. mdb"// Create A recordset object instance RS for the EMP table.Set rs = server. Createobject ("ADODB. recordset ")Rs. Open "EMP", Conn, 3
Pagesize = 10 // The pagesize attribute specifies the number of records to be displayed on each page.Page = clng (Request ("page") 'string type to long typeIf page If page> Rs. pagecount then page = Rs. pagecountIf page Response. Write "Response. Write "End ifIf page Response. Write "Response. Write "End i
page is the last one, the next and last pages cannot be clicked. There are also the following rules: * if the total number of pages is greater than 10 and the current page is far away from the total number of pages (less than 5), five will be displayed, and the following will be omitted until the last one; * If the total number of pages is greater than 10 and the current page is close to the total number of pages (less than the total number of pages-3), the last four pages are displayed. * In a
://www.javajia.net/viewtopic.php? P = 90213
5.2 read configuration filesRefer to the following connection content:Http://dev.csdn.net/develop/article/39/39681.shtm
5.3 read an XML file through a virtual path or relative path to avoid hard Encoding
Refer to the following connection content:
Http://club.gamvan.com/club/clubPage.jsp? Ipage = 1 tid = 10708 CCID = 8
6. Common Operations on files in Java (copying, moving, deleting, creating, et
equal to the total page 10 outcontent = content_tmp (page-1) 'Let the output variable = split the page-1 page in the content. For example, if you have two paging symbols, three pages are displayed, and content_tmp (0) is the first page, content_tmp (1) is the second page... 11 else12 outcontent = content 'if it does not contain a paging character, it is directly equal to 13 end if14 15 response. write (outcontent) 'output content
Then you can see the above ASP code?
Now, the content is output,
relative path of the file to avoid hard encoding and absolute path usage. (From Network)5.1 use the di mechanism of spring to obtain files and avoid hard coding.Refer to the following connection content:Http://www.javajia.net/viewtopic.php? P = 90213 5.2 read configuration filesRefer to the following connection content:Http://dev.csdn.net/develop/article/39/39681.shtm
5.3 read an XML file through a virtual path or relative path to avoid hard Encoding
Refer to the following connection content:Ht
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.