Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1015381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:23:35+00:00 2026-05-16T10:23:35+00:00

I am curious to know how does paging work in asp.net? If my query

  • 0

I am curious to know how does paging work in asp.net?
If my query returns 500 records, and my gridview paging limits to 25 records per page, when the gridview loads, does the recordset return 25 records or 500 records?

If the recordset returns 25 records, how does ado communicate with SQL to return records for page two?

If the recordset returns 500 records, are they cached within the client side?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T10:23:36+00:00Added an answer on May 16, 2026 at 10:23 am

    From MSDN:

    the GridView control will perform
    paging by getting all of the data
    records from the source, displaying
    only the records for the current page,
    and discarding the rest.

    So the answer is, it doesn’t really do efficient “paging”, like many aspects of Web Forms, its all abstracted away. It’s not really doing a “SELECT TOP 10”.

    It’s simply disregarding the records it doesnt need – but the DB call is still a “SELECT *”.

    That is why many people (myself included), prefer to write custom yet simple paging with LINQ, using the Skip and Take IEnumerable extension methods.

    E.g

    yourDbContext.Where(s => somePredicate).Skip((pageNum - 1) * pageSize).Take(pageSize);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm just curious about this really, does anyone know why they broke convention on
Curious to know how people set up their personal and/or work development environment, in
I was just curious to know - why does Arrays.equals(double[][], double[][]) return false? when
I'm curious to know why the following code behaves differently? The following does not
Just curious does anyone know a program or script to generate a style sheet(with
I'm curious to know how NULLs are stored into a database ? It surely
I'm curious to know whether the PDFKit framework is available for use within the
I am curious to know how the Loader maps DLL into Process Address Space.
I'm curious to know if there is an easy way to mock an IMAP
I am curious to know where the Don't Fragment [DF] Bit of the IP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.