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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Splitting records over pages

Status
Not open for further replies.

NevG

Programmer
Oct 10, 2000
162
GB
Hi gang

Im writing a report style ASP page that throws the contents of a table onto the web. There is however hundreds of records.

What is the easiest way to split my recordset into groups of 30 or something, with a link to the next 30 and so on. Similar to the threads screen here.

Thanks for any help

Nev G
 
hai nevg,
according to ur problem ,u should redirect the page to the same asp,pass the querystring parameters like tablename,recordpositon,pagenumber.
in the starting of the page u write the vbscript to get the querystring and open the recordset for the tablename,print the records from the recordposition to next 30 records or something as ur wish and incriment the pagenumber on clicking the next button.
simillarly in back button decrement the pagenumber and recordset starting position will specify backwards.

here i send a example code for that NEXT Url link
on the fist time u declare these variable dinamically as

nextpage=nextpage+1
count=30 'as u wish for record display for each page

<a href=&quot;<%=webpath%>next.asp?table=employee&cnt=<%count%>&nextpage=<%=nextpage%>&quot;>Next</a>

try this method,otherwise mail me in raghuram23@hotmail.com
with subject from tektips,i will help u.

all the best

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top