עם אתה עובד בASP אז הינה הקוד בהצלחה
ציטוט:
<%
Dim currPage,i,pCount, numRecs
currPage = 1
numRecs = 20
if Not request("currPage") = "" then
currPage= request("currPage")
end if
rs.Open "SELECT * FROM tbl",conn,3,1,1
rs.PageSize = numRecs
rs.CacheSize = numRecs
if Not rs.EOF Then
pCount=rs.pageCount
rs.AbsolutePage=CurrPage
End If
Do While Not rs.EOF AND i < rs.pagesize
' Data manipulation
i=i+1
rs.MoveNext
Loop
rs.Close
for i = 1 to pCount
if Cint(i) = Cint(currPage) then
Response.Write " <b>"& i &"</b> "
Else
Response.Write " <a href=""thePage.asp?currPage="&i&""">"& i &"</a> "
End If
Next
%>
|
תהנה