Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > Other ASP.NET > BOOK: Professional ASP.NET Design Patterns
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET Design Patterns
This is the forum to discuss the Wrox book Professional ASP.NET Design Patterns by Scott Millett; ISBN: 978-0-470-29278-5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET Design Patterns section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 7th, 2013, 07:11 AM
Registered User
Points: 14, Level: 1
Points: 14, Level: 1 Points: 14, Level: 1 Points: 14, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Calculating Number of Result Pages

The following method is taken from /Agathas.Storefront.Services/Mapping/ProductMapper.cs

private static int NoOfResultPagesGiven(int numberOfResultsPerPage, int numberOfTitlesFound)
{
if (numberOfTitlesFound < numberOfResultsPerPage)
return 1;
else
{
return (numberOfTitlesFound / numberOfResultsPerPage) + (numberOfTitlesFound % numberOfResultsPerPage);
}
}

Shouldn't the logic be:
(numberOfTitlesFound / numberOfResultsPerPage) + 1;


Regards,
Bilal
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why are number of pages inconsistent? Audioicon BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 October 16th, 2008 09:02 PM
Reducing the number of Pages in a Report derekdeben Access 1 January 23rd, 2007 04:58 PM
Formating xpath function result number ronisc XSLT 4 December 20th, 2006 08:04 AM
Calculating number of days between multiple dates Vann Access 4 December 3rd, 2004 07:26 PM
Result in more pages ciko1973 Classic ASP Databases 1 July 5th, 2003 09:56 AM



All times are GMT -4. The time now is 01:21 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.