Without simple paging of components

Source: Internet
Author: User
Tags end prev
Paging | page set Conn=server. CreateObject ("Adodb.connection")
Set Rs=server. CreateObject ("Adodb.recordset")
Cnpath= "Data source=" & server. MapPath ("Question.mdb")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0" & Cnpath

Rs.Open "BBS", conn,3,3

Set Rs=conn.execute ("SELECT * FROM MyTable")
Do Until rs.eof
Tatalrecord=tatalrecord+1
Rs.movenext
Loop
Num=tatalrecord Mod 15
If Num>0 Then
I=1
Else
I=0
End If
Tatalpage=int (Tatalrecord/15+i)
Rs.movefirst
Page=request.querystring ("page")

If page= "" Then
Page=1
End If
If not rs.eof then
If Page=1 Then
Rs.movefirst
Else
Rs.move ((page-1) *15)
End If

For ipage=1 to 15

If Rs.eof Then
Exit For
Response.End
End If

RS ("xxxxx")

Rs.movenext
Next
End If

If Page=1 then%>
<a href= "bbs.asp?page=<%=page+1%>" > next page </a>
<a href= "bbs.asp?page=<%=tatalpage%>" > Last </a>
<%
ElseIf int (page) =int (tatalpage) Then
%>
<a href= "bbs.asp?page=1" > Home </a>
<a href= "bbs.asp?page=<%=page-1%>" > Prev </a>
<%else%>
<a href= "bbs.asp?page=1" > Home </a>
<a href= "bbs.asp?page=<%=page-1%>" > Prev </a>
<a href= "bbs.asp?page=<%=page+1%>" > next page </a>
<a href= "bbs.asp?page=<%=tatalpage%>" > Last </a>

<%
End If%>
Total <b><%=tatalrecord%></b> Records page <b><%=page%>/<%=tatalpage%></b> per page <b >15</b> Records



<form action= "bbs.asp" style= "position:relative" >
<p align= "Right" >
Jump to <input type= "text" name= "page" size= "4" > Page <input type= "Submit" value= "Determine" name= "B1" style= "Border-style: Solid ">
</form>



Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.