ASP implementation of long article pagination _ Application Skills
Source: Internet
Author: User
<%
' Processing receive paging parameters, display page number is also default first
' Page This parameter is to let the variable Pagenum to show the first also get value: 0
If Request ("page") = "" Then
Pagenum=0
' Here is the page connection parameter
Else
Pagenum=request ("page")
If not IsNumeric (Pagenum) Then
Call DH. Alert ("Operation Error!") ","-1 ")
Else
PAGENUM=CLNG (Pagenum)
End If
End If%>
<%
' Here's the key. Assign your content field to Contentstr
Contentstr=replace (RS ("Dhsl_content")), "| | |", "| | | ")
%>
<%
' Use function SPList to remove the fragment into Contentstr
Contentstr=split (contentstr, "| | |")
' Below is the URL to get the page variable
For i = Pagenum to Pagenum
%>
' and then display the content
<%=contentstr (i)%>
<% Next%>
This chapter is divided into:
<%
For p = 0 To UBound (CONTENTSTR)
%>
<a href= "content page name. asp? Passed parameters =<%=request (" Accepted parameters ")%>&page=<%=p%>" class= "text ><%=p+1%> </a>
<% Next%> Page
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