Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding next and previous buttons to my page...

Status
Not open for further replies.

welshone

Programmer
Jul 30, 2001
414
GB
hello,

I am creating the following table and want to add buttons (next and previous), so instead of showing all records on one page, It will only show 30, then I can click next to show the next 30, and so on.

can anybody help me ?

thank you in advance.
Jamie.

<TABLE BORDER=2 BGCOLOR=#ffffff CELLSPACING=1 CELLPADDING=3><FONT FACE=&quot;Arial&quot; COLOR=#000000>

<THEAD>
<TR>
<TH BGCOLOR=royalblue BORDERCOLOR=#000000 nowrap><FONT SIZE=2 FACE=&quot;Arial&quot; COLOR=#000000>UPN</FONT></TH>
<TH BGCOLOR=royalblue BORDERCOLOR=#000000 nowrap><FONT SIZE=2 FACE=&quot;Arial&quot; COLOR=#000000>Forename</FONT></TH>
<TH BGCOLOR=royalblue BORDERCOLOR=#000000><FONT SIZE=2 FACE=&quot;Arial&quot; COLOR=#000000>Surname</FONT></TH>
<TH BGCOLOR=royalblue BORDERCOLOR=#000000><FONT SIZE=2 FACE=&quot;Arial&quot; COLOR=#000000>Date Of Birth</FONT></TH>

</TR>
</THEAD>
<TBODY>
<%
On Error Resume Next
rs.MoveFirst
do while Not rs.eof
%>
<TR VALIGN=TOP onMouseover=&quot;changeto('yellow')&quot;
onMouseout=&quot;changeback('white')&quot;>
<a href=&quot;./moredetails.asp?G_id=<%=Server.HTMLEncode(rs.Fields(&quot;UPN&quot;).Value)%>&quot;>
<TD BORDERCOLOR=#c0c0c0 nowrap><FONT SIZE=2 FACE=&quot;Arial&quot; COLOR=#000000><%=Server.HTMLEncode(rs.Fields(&quot;UPN&quot;).Value)%>
</FONT></TD>
<TD BORDERCOLOR=#c0c0c0 nowrap><FONT SIZE=2 FACE=&quot;Arial&quot; COLOR=#000000><%=Server.HTMLEncode(rs.Fields(&quot;forename&quot;).Value)%>
</FONT></TD>
<TD BORDERCOLOR=#c0c0c0><FONT SIZE=2 FACE=&quot;Arial&quot; COLOR=#000000><%=Server.HTMLEncode(rs.Fields(&quot;Surname&quot;).Value)%>
</FONT></TD>
<TD BORDERCOLOR=#c0c0c0><FONT SIZE=2 FACE=&quot;Arial&quot; COLOR=#000000><%=Server.HTMLEncode(rs.Fields(&quot;DOB&quot;).Value)%>
</FONT></TD>
</TD></a>

</TR>
<%
rs.MoveNext
loop%>

</TBODY>
<TFOOT></TFOOT>
</TABLE>
 
What you're looking for is paging. Here's a FAQ on the subject:

faq333-186

good luck! :)
paul
penny.gif
penny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top