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

  • Home
  • SEARCH
  • 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 9170739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:04:08+00:00 2026-06-17T16:04:08+00:00

I have a table in my SQLServer database with almost 100K records in it

  • 0

I have a table in my SQLServer database with almost 100K records in it and a web application in which I want to show a paged gridView presentation of these rows. Clearly I should filter the rows and return a small subset of them to client(because of the Ajax performance on web).

Here’s my main problem. What’s the best approach to select the middle rows? For example How can I select the rows from #50000 to #50010? Is there a way like select top 10 or select bottom 10 that selects the rows from middle of the table rows.

I’m using linq2sql in a .NET MVC web application & also can code SQL StoredProcedures.

Any suggestion will be appreciated.

  • 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-06-17T16:04:08+00:00Added an answer on June 17, 2026 at 4:04 pm

    In Linq2Sql this is not that hard. You can use:

    dataContext.GetTable()
        .Skip(50000)
        .Take(10)
        .ToList();
    

    Scott Guthrie has a post on this matter, which has some more explanation. And Linq2Sql will actually produce sql using ROW_NUMBER().

    Some small hint, the order of your expressions is important:

    • .Where()
    • .Select()
    • .OrderBy()
    • .Skip()
    • .Take()
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a DataGridView which is filling from Table in SQL Server Database. One
I have a SQL Server database with 500,000 records in table main . There
I have a user defined type, which is a datatable in an SqlServer database.
I have a table in my SQLServer 2000 database that has in my opinion
I have a SQL Server 2008 R2 database table with 12k address records where
one table of my database in sqlserver have a column with type of int
I have a table with 9 columns in database and I want to be
I want to insert some session data in a database. I have one table
I have a database which has almost 300 tables, I've just come across with
I have an asp.net web page which interacts with a SQL Server database, grabs

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.