ASPAlliance.com : The #1 Active Server Pages .NET Community The #1 ASP.NET Community
Search   Search

Subscribe   Subscribe

Powered by ORCSWeb Hosting


Site Stats


Powered By ASP.NET
 
Featured Sponsor

Featured Columnist


Featured Book
.NET Enterprise Design with Visual Basic .NET and SQL Server 2000
.NET Enterprise Design with Visual Basic .NET and SQL Server 2000

Find Prices
Sample Chapter


New! asp.netPRO

We publish our articles in the standard RSS format.

Powerful .NET Email Component

Code Sharing Software
CNET Channel
Home Articles

Back to article index


Custom data paging class.

One of the most common tasks when you have to display huge amount of data from database source is to provide front-end paging mechanism. This task became much easier when we got a DataGrid control which provides this paging, but, nevertheless, it is not flexible enough.

Imagine, for example,that you want locate your page navigation bar in any place of the page, or you want to implement paging mechanism on the SQL stored procedure layer, or smth else. Then DataGrid paging feature does not suit.

So, for this purpose, I have special common C# class which implements navigation bar. It should be initialized with some parameters (PagesOnPage,PageSize, etc - refer to code), and then it builds special XML, which describes navigation bar.
After transforming it with special XSLT you get very flexible navigation bar which can hide custom paging mechanism.

Also you can see an excerpt with comments from my real project which shows how to use this class. In my example paging is implemented on the stored procedure layer, so you have to pass record range in the stored procedure.








Download code
 Copyright © 2000-2003 ASPAlliance.com  Page Rendered at 11/22/2009 3:06:47 PM