www.gusucode.com > 枫的记忆个人主页程序源码程序 > downcode.com\fengdejiyizh\page_up_down.asp

    <%
	CurrentPage=0
	PageCount=0
	RecordCount=0	
	page_no=Trim(Request("page_no"))
								
	if page_no="" then
	    page_no=1
	else
	    page_no=Cint(page_no)
	end if
					
					
  	Do While Not rs.EOF
	    RecordCount = RecordCount + 1
	    rs.MoveNext
	Loop

	if Not rs.BOF then 
	    rs.MoveFirst 
	end if
				  
	PageCount = Round(RecordCount/PageSize)
	If PageCount < RecordCount/PageSize then 
	    PageCount = PageCount + 1 
	end if
															
	CurrentPage=Page_No
														
	if CurrentPage>pagecount then 
	    CurrentPage=pagecount
	end if
	Page_No=CurrentPage	
				  
	startrecord=(CurrentPage-1)*pagesize
								
	if not rs.eof then	
	    rs.MoveFirst 
	end if
														
	if not rs.eof then			
	    rs.Move startrecord
	end if	
	processedrecord=0
		
%>