Dilip
You need to use pageing of your recordset, inorder to divide the results up into uniform blocks that you can then scrolled through.
try this:
add these routines:
dim nPage
public sub PagingSetup(oRS)
if request("Page"

<> "" then
nPage = request("Page"

else
nPage = 1
end if
if IsEmpty(nPage) Or nPage = "" or nPage < 1 then
nPage=1
end if
If oRS.RecordCount > 0 Then
oRS.AbsolutePage = nPage
End If
end sub
public sub ZoomToPage(oRS,sPageName,nPage)
on error resume next
%>
<% if nPage-1 > 0 then %>
<a href="<%=sPageName%>?Page=<%=nPage-1%>"><<</a>
<%end if%>
<% if nPage-10 > 0 then %>
<a href="<%=sPageName%>?Page=<%=nPage-10%>"><%=nPage-10%>
</a><%end if%>
<% if nPage-9 > 0 then %>
<a href="<%=sPageName%>?Page=<%=nPage-9%>"><%=nPage-9%>
</a><%end if%>
<% if nPage-8 > 0 then %>
<a href="<%=sPageName%>?Page=<%=nPage-8%>"><%=nPage-8%>
</a><%end if%>
<% if nPage-7 > 0 then %>
<a href="<%=sPageName%>?Page=<%=nPage-7%>"><%=nPage-7%>
</a><%end if%>
<% if nPage-6 > 0 then %>
<a href="<%=sPageName%>?Page=<%=nPage-6%>"><%=nPage-6%>
</a><%end if%>
<% if nPage-5 > 0 then %>
<a href="<%=sPageName%>?Page=<%=nPage-5%>"><%=nPage-5%>
</a><%end if%>
<% if nPage-4 > 0 then %>
<a href="<%=sPageName%>?Page=<%=nPage-4%>"><%=nPage-4%>
</a><%end if%>
<% if nPage-3 > 0 then %>
<a href="<%=sPageName%>?Page=<%=nPage-3%>"><%=nPage-3%>
</a><%end if%>
<% if nPage-2 > 0 then %>
<a href="<%=sPageName%>?Page=<%=nPage-2%>"><%=nPage-2%>
</a><%end if%>
<% if nPage-1 > 0 then %>
<a href="<%=sPageName%>?Page=<%=nPage-1%>"><%=nPage-1%>
</a><%end if%>
<%if nPage > 0 then %>
<%=nPage%>
<%end if%>
<%if nPage+1 <= oRS.PageCount then %>
<a href="<%=sPageName%>?Page=<%=nPage+1%>"><%=nPage+1%></a>
<%end if%>
<% if nPage+2 <= oRS.PageCount then %>
<a href="<%=sPageName%>?Page=<%=nPage+2%>"><%=nPage+2%></a>
<%end if%>
<% if nPage+3 <= oRS.PageCount then %>
<a href="<%=sPageName%>?Page=<%=nPage+3%>"><%=nPage+3%></a>
<%end if%>
<% if nPage+4 <= oRS.PageCount then %>
<a href="<%=sPageName%>?Page=<%=nPage+4%>"><%=nPage+4%></a>
<%end if%>
<% if nPage+5 <= oRS.PageCount then %>
<a href="<%=sPageName%>?Page=<%=nPage+5%>"><%=nPage+5%></a>
<%end if%>
<% if nPage+6 <= oRS.PageCount then %>
<a href="<%=sPageName%>?Page=<%=nPage+6%>"><%=nPage+6%></a>
<%end if%>
<% if nPage+7 <= oRS.PageCount then %>
<a href="<%=sPageName%>?Page=<%=nPage+7%>"><%=nPage+7%></a>
<%end if%>
<% if nPage+8 <= oRS.PageCount then %>
<a href="<%=sPageName%>?Page=<%=nPage+8%>"><%=nPage+8%></a>
<%end if%>
<% if nPage+9 <= oRS.PageCount then %>
<a href="<%=sPageName%>?Page=<%=nPage+9%>"><%=nPage+9%></a>
<%end if%>
<% if nPage+10 <= oRS.PageCount then %>
<a href="<%=sPageName%>?Page=<%=nPage+10%>"><%=nPage+10%></a>
<%end if%>
<% if nPage+1 <= oRS.PageCount then %>
<a href="<%=sPageName%>?Page=<%=nPage+1%>">>></a>
<%end if%>
<%end Sub
'-----------------------------------------------------------------------
%>
then add this to rs:
rs.pagesize = i '(no. you want to display)
then add this in the page:
<%ZoomToPage rs,"display.asp",nPage%> 'pass in rs, page name, page number
then you need to put a incremental no. in your rs loop and stop the rs loop when no. is equal to pagesize eg.
<%do until rs.EOF or iRec = rs.PageSize
iRec = iRec + 1
%>
This should sort it. [sig][/sig]