Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 16th, 2004, 01:04 AM
Authorized User
 
Join Date: Jul 2003
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default record count and numbering.

Hi

I just need some help in numbering pages and showing how many items are a part of a id.

In this case i have business that belong to a category.

I might have 300 business that belong to a category but only 55 are active and 345 are inactive.

I have constructed a directory type of website and all i need to do is to say

preferred suppliers: 1 - 20 of 55
then the next page

preferred suppliers: 21 - 40 of 55
then the next page

preferred suppliers: 41 - 55 of 55

then show

nonpreferred suppliers: 1 - 20 of 345
till the end

Hope this makes sense. if someone can help it will be much appreciated.





 
Old November 17th, 2004, 04:34 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 104
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sureshbabu Send a message via Yahoo to sureshbabu
Default

Hi,
   just use the following logic while displaying the records.

<%if (objRs.AbsolutePage = objRs.PageCount) then%>
<tr>
<td align="Right" colspan=8>
contents: <%=objRs.AbsolutePosition & " - " & objRs.RecordCount & " of " & objRs.RecordCount%>
</td>
</tr>
<%else %>
<tr>
<td align="Right" colspan=8>
Contents: <%=objRs.AbsolutePosition & " - " & (objRs.AbsolutePage * objRs.PageSize) & " of " & objRs.RecordCount%>
</td>
</tr>
<%end if%>

--------
Hopes this works fine
Thanks
suresh






Similar Threads
Thread Thread Starter Forum Replies Last Post
count no of record sanjeev jha ADO.NET 1 November 5th, 2007 12:28 PM
Record count deb1980 ASP.NET 2.0 Basics 6 April 10th, 2007 12:42 PM
Count Record prasanta2expert Access 3 November 28th, 2006 10:42 AM
Page numbering: count odd pages only zolex82 XSLT 0 December 5th, 2005 11:43 AM
How to count a record when it is not there Mitch Access 1 October 3rd, 2003 03:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.