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 8698107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:40:08+00:00 2026-06-13T01:40:08+00:00

I have a checkboxlist in my C#/asp.net project and I’m populating it with a

  • 0

I have a checkboxlist in my C#/asp.net project and I’m populating it with a dataTable that gets data from a query to my database. The query returns a large amount of data and I want to restrict the number of elements that it shows initially before I filter the data. (To, say, the top 1000). How would I go about doing this?

  • 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-13T01:40:09+00:00Added an answer on June 13, 2026 at 1:40 am

    There are two places where you can limit the number of data.

    In the database (assuming you use SQL Server) you can modify the query to return the top 1000 rows.

    SELECT TOP 1000 * FROM SomeTable
    

    Or you can filter the data after it arrives using Linq.

    var newData = dataTable.AsEnumerable().Take(1000);
    

    I would prefer the first method, so you don’t truck around useless data. But the second definitely works as well if you need that data elsewhere.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET server control that inherits from CheckBoxList that renders the controls
In ASP.NET I have the option for building a CheckBoxList control from a data
I have asp.net checkboxlist control that bounded to a data source so the number
I have an asp.net panel that contains a checkboxlist. I'd like to resize it
Hey, I have a CheckBoxList that gets populated with the database. When I make
I have a checkboxlist in C# that is databound from the database. What I
I have a Web User Control that contains a CheckBoxList. MyListControl: <asp:checkboxlist id=chkList runat=server>
I have translated Jeremiah Clark's CheckBoxList Helper for MVC into my VB.Net project but
I am using ASP.NET checkboxlist control. On the page I have a hyperlink. On
I have a custom control that mimics to some extent the built in ASP.Net

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.