- Online Barcode Generator
- How To
- Buy Now
In this guiding page, we will introduce to you the paging feature for your listview control. ListView library component is a powerful and professional UI control designed for web developers to use in ASP.NET AJAX developing environment. It provides flexible paging functionalities to help you create a listview with intuitive interface.
In the following sections, detailed explanations will be provided for some of the most crucial properties related to listview paging in your ASP.NET AJAX application, such as AllowPaging, PageSize, and CommandArgument, which specifies how to turn to first / last / previous or next page, just to name a few here.
In addition, using this paging feature, users can easily view large sum of data page by page, so you can enjoy better viewing experience as well as improved loading speed and better navigation.
Apart from this listview paging guide, Kettic also provides you with some other related tutorials for your listview customization. We have listed a few here, and you can get more from the navigation bar as well as the user manual in the download package.
How to Set Paging for ListView
In general there are three things you need to pay attention to for your listview paging. Once you get to know how to set these three thing as you like, you can easily get a customized paging for your listview.
The first one is the AllowPaging property. This is the beginning of the whole story. Only until you set this property to true can you proceed with any further paging customization. Of course, if you really don't need the paging, just disable it right away.
The second property you can set is the PageSize. By assigning a value to this property, you can decide how many items should appear in one page, thus controlling the total number of pages for your listview.
Additionally you can set the Command Argument, which is used to set the buttons which we see all the time, such as First, Pre, Next, Last, just to name a few here.
In the following sample, we will show you how to create a paging for listview that includes buttons for the first page, previous page, next page, last page. You will also be able to set the current page index, as well as the page size.
This is how the paging looks like after the customization:
This is the corresponding aspx sample codes for it:
<kettic:PerListView ID="PerListView1" DataSourceID="SqlDataSource1" runat="server"
ASP.NET AJAX UI Controls