|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Creating a simple record counter in a table
<i><b>Originally posted by : KevinM (mullarkey@fs5.ee.umist.ac.uk)</b></i><br />ASP NEWBIE QUERY...<br /><br />An MS Access table is returned via a simple text box search and viewed on a asp page 25 records at a time. Also on the page are 'prev', 'Next' and numbers as hyperlinks to navigate between pages.<br /><br />What I want to do is add a column to the table that puts a simple record/line number. So you would have 1 to 25 on the first page, 26 to 50 on the second and so on.<br /><br />Now I used to be able to do this when I used command buttons as the 'prev' and 'next'. <br />I simply carried Ln (Line number value) as a hidden field when one of the buttons was clicked.<br />But how do I carry the value over to the next page now that there is no form to submit the value?, as I am using a querystring to return the records on the next page.<br /><br />The variables I have at my disposal are..<br />intPageNum ' The page number<br />RecordCount 'The total number of records returned<br />PageCount ' The total number of pages<br />PageSize ' The number of records per page (25, although varies if it is the last page)<br /><br />I have this problem when developing dbs in Access as there is no built in feature to get the actual 'record/line number'.<br /><br />Is there a built in method using asp/vbscripts?<br />Is there a formula that I just can't see with the above variables?<br />Or if there's a way of passing Ln to the next page (no cookies!) then I would appreciate any help<br /><br />Many Thanks<br /><br />Kevin M<br />
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : steve</b></i><br />http://aspfree.com/authors/steveh/paging/Default.asp<br /><br />check this demo out. Its a start, email me at sschofield@aspfree.com if this isn't helpful<br /><br /><br />------------<br />KevinM at 4/24/2000 4:15:39 PM<br /><br />ASP NEWBIE QUERY...<br /><br />An MS Access table is returned via a simple text box search and viewed on a asp page 25 records at a time. Also on the page are 'prev', 'Next' and numbers as hyperlinks to navigate between pages.<br /><br />What I want to do is add a column to the table that puts a simple record/line number. So you would have 1 to 25 on the first page, 26 to 50 on the second and so on.<br /><br />Now I used to be able to do this when I used command buttons as the 'prev' and 'next'. <br />I simply carried Ln (Line number value) as a hidden field when one of the buttons was clicked.<br />But how do I carry the value over to the next page now that there is no form to submit the value?, as I am using a querystring to return the records on the next page.<br /><br />The variables I have at my disposal are..<br />intPageNum ' The page number<br />RecordCount 'The total number of records returned<br />PageCount ' The total number of pages<br />PageSize ' The number of records per page (25, although varies if it is the last page)<br /><br />I have this problem when developing dbs in Access as there is no built in feature to get the actual 'record/line number'.<br /><br />Is there a built in method using asp/vbscripts?<br />Is there a formula that I just can't see with the above variables?<br />Or if there's a way of passing Ln to the next page (no cookies!) then I would appreciate any help<br /><br />Many Thanks<br /><br />Kevin M<br />
|
![]() |
| Viewing: ASP Free Forums > Programming > ASP Development > Creating a simple record counter in a table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|