total pages

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey all,
i have a gridview of records and i'm trying to display the total pages with
10 records per page.

int totalpages;
totalpages = 1148 / 10;
totalpages = 114;

there's actually 115 total pages. how can i make sure i don't miss that last
page?

thanks,
rodchar
 
hey all,
i have a gridview of records and i'm trying to display the total pages with
10 records per page.

int totalpages;
totalpages = 1148 / 10;
totalpages = 114;

there's actually 115 total pages. how can i make sure i don't miss that last
page?

thanks,
rodchar

totalpages = total / pageSize;
if (((float)total / pageSize) > totalpages) totalpages += 1;
 
Back
Top