ASP 101 - Active Server Pages 101 - Web03
The Place ASP Developers Go!

Please visit our partners


Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates














ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash





ASP.NET version of "Database Paging"


Here's an ASP.NET version of our classic "Database Paging" script. While paging through query results is much easier in ASP.NET then it was in classic ASP, it never hurts to have some sample code to take a look at...

There are two types of paging supported by ASP.NET's DataGrid control: default paging and custom paging. This sample illustrates default paging. Of the two types, default paging is much simpler, but it's also less efficient. The reason for this is that the paging is performed on the web server and not at the DB. This results in every record in the table being retrieved for each request even though only the records on the current page are shown. For small tables, the difference isn't all that noticable, but as your table size increases, the performance will decrease and the resources required will increase.

We'll look at custom paging in a future sample, but for the time being here's a sample of the ASP.NET DataGrid's default paging which works just fine for most applications.

Here's a zip file of the code (1 KB).

Play with the running version.

View the live source code.


Back to the "Database Paging" sample


Samples

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers