Get Total Number Of Pages

Discussion in 'ASP .Net' started by paulsmith5@hotmail.com, Dec 9, 2005.

  1. Guest

    Hi,

    Given that I have an two integers - firstly the total number of items
    and secondly the number of items per page what is the syntax to give me
    the total number of pages. For example if there were 10 items and a
    page size of 3 then 4 pages are required.

    Thanks,

    Paul
     
    , Dec 9, 2005
    #1
    1. Advertising

  2. You mean something like Math.Ceiling(totalCnt/perPageCnt);

    <> wrote in message
    news:...
    > Hi,
    >
    > Given that I have an two integers - firstly the total number of items
    > and secondly the number of items per page what is the syntax to give me
    > the total number of pages. For example if there were 10 items and a
    > page size of 3 then 4 pages are required.
    >
    > Thanks,
    >
    > Paul
    >
     
    Peter Rilling, Dec 9, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Quentin Huo
    Replies:
    5
    Views:
    518
    =?Utf-8?B?TWF0dCBIYW1pbHRvbg==?=
    Sep 1, 2004
  2. =?Utf-8?B?ZGF2aWQ=?=

    How to get the total number of rows in a Dataset?

    =?Utf-8?B?ZGF2aWQ=?=, May 3, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    17,309
    Yunus Emre ALPĂ–ZEN [MCAD.NET]
    May 3, 2005
  3. Mullin
    Replies:
    4
    Views:
    5,489
    Harald
    Jun 12, 2005
  4. Praveen homkar via JavaKB.com

    how to get total number of rows contained in a resultset

    Praveen homkar via JavaKB.com, Aug 5, 2005, in forum: Java
    Replies:
    1
    Views:
    5,340
  5. Wei  Su
    Replies:
    36
    Views:
    1,159
    Dave Thompson
    Aug 22, 2005
Loading...

Share This Page