Article 1ArticleIf the number of words is too large, 1, 2, 3... is used to divide the pages into multiple pages to facilitate user browsing.
<%
Set recordset1 = server. Createobject ("ADODB. recordset ")
Exec = "select * from news where id =" & ID
Recordset1.open exec, Conn, 1, 1
%>
<Table width = "85%" border = "0" align = "center" cellpadding = "3" cellspacing = "0">
<Tr> <TD>
.......
<%
If request ("page") = "" then
Pagenum = 0
Else
Pagenum = request ("page ")
End if
Content = Replace (recordset1 ("content"), "|", "| ")
Contentstr = Split (content, "| ")
For I = pagenum to pagenum
%>
<% = Contentstr (I) %>
<% Next %>
</TD>
</Tr>
<% If ubound (contentstr) >=1 then %>
<Tr>
<TD Height = "30"> This article is divided
<%
For p = 0 to ubound (contentstr)
If p + 1 = request ("page") + 1 then
A = "<font color = Red>"
AA = "</font>"
Else
A = ""
AA = ""
End if
%>
<A href = "detail. asp? Id = <% = request ("ID ") %> & page = <% = P %> "> <% = A %> <% = P + 1%> <% = Aa %> </a>
<% Next %>
Page </TD>
</Tr>
<% End if %>
When adding an article, add a separator | where you want to pagination.