The following is the content of several articles over the long implementation of the page source code.
' Manual Paging by identity
function Manualpage (str)
Pages=request. QueryString ("page")
Contentstr=split (str, "{$page $}")
Response.Write (CONTENTSTR (pages))
Response.Write ("<p/>")
Response.Write ("<div class=" "PageList" ">")
For i = 0 To UBound (CONTENTSTR)
Response.Write ("<a href= '? id=" &id& "&page=" &i& "' >" &i+1& "</a>")
Next
Response.Write ("</div>")
End Function |
' Paging by length
function AutoPage (str,fontnum)
If Len (str) >fontnum Then
If Len (str) mod fontnum>0 then ' calculate total pages
Pagecontent=len (str) \fontnum+1
Else
Pagecontent=len (str) \fontnum
End If
Dim arr ()
ReDim arr (pagecontent)
for m = 1 to PageContent
If M<>pagecontent Then
Arr (m) = Mid (str, (m*fontnum-fontnum+1), Fontnum)
Else
Arr (m) = Mid (str, (m*fontnum-fontnum+1), Len (str))
End If
Next
If Request.QueryString ("page") <> "then
Response.Write (Arr (Request.QueryString ("page"))
Else
Response.Write (arr (1))
End If
Response.Write ("<p/>")
Response.Write ("<div class=" "PageList" ">")
For i = 1 to PageContent
Response.Write ("<a href=?id=" &id& "&page=" &i& ">" &i& "</a>")
Next
Response.Write ("</div>")
Else
Response.Write (str)
End If
End Function |
=============================
In the page
<%
if instr (Content, "{$page $}") =0 then ' Determines if it is a manual paging flag, not an automatic paging
call autopage (content,2000)
else
call manualpage (Content)
end if
%> |
If you need more relevant ASP paging information, there will be more relevant solutions available to you in Arisisi www.alixixi.com.
This site is recommended to use the Add Tag page, where you want to change, you can avoid the unreasonable phenomenon of the section break position.