| |
T1TAN23
Posts: 11
Score: 0
Joined: 5/11/2005
From: USA
Status: offline
|
you could try this... Pass a querystring to the page displaying the records to let you know where to start from the make s sub routine to display the records Sub displayRecords (rs,Position) Dim Count rs.Move Position Do While NOT rs.EOF AND Count < 21 Response.Write rs("fieldName") Count = Count + 1 rs.MoveNext() Loop End Sub Then at the bottom of the page where you create you navigation have the page link back to itself but pass a querystring like so <a href="mypagfe.asp?Position=1">1</a><a href="mypage.asp?Position=20">2</a><a href="mypage.asp"Postion="40">3</a> and so on You can return the count of the rs to detemine how many page links to create and even create another su to spit out the pages needed Sub displayPageNavigation(mypage.asp,RecordsPerPage, rs) Dim Count Dim lcv Count = rs.Count / RecordsPerPage Response.write "<a href=""mypage.asp?Position=1">1</a>" lcv = 2 Do While lcv < count Response.write "<a href=""mypage.asp?Position=" lcv * RecordsPerPage & """>lcv</a>" lcv = lcv + 1 Loop end Sub Not sure if all that is going to work but it should at least get you started.
|
|