The following subroutine requires two parameters
1) Recordset
2) Count of records per page. For example:
Call EasyPaging(Rs,10)<%Sub EasyPaging(MyRecordset,RecordsperPage) Dim CurrentPage,Myurl Myurl=Request.ServerVariables("script_name") MyRecordset.PageSize = RecordsperPage:MyRecordset.CacheSize =RecordsperPage 'get the current page number CurrentPage = Request.QueryString("Page") If CurrentPage = "" Or CurrentPage = 0 Then CurrentPage = 1 MyRecordset.AbsolutePage = CurrentPage 'write the content with Response .Write "" .Write "" For Each myfld In MyRecordset.Fields .Write "" & myfld.Name & " " Next .Write " " .Write "" 'use getstring .write MyRecordset.GetString(2, RecordsperPage, _" ", " ", " ") .Write "
" If CInt(CurrentPage) > 1 Then .Write "  " End If If CInt(CurrentPage) < MyRecordset.PageCount Then .Write "Next>" End If End WithEnd Sub%>