Home >> ASP.NET >> Pagination in GridView

Pagination in GridView

Simply we will learn here how to Apply Pagination in GridView Control of ASP.NET.
Directly to Code:
In ASPX page, enable paging in GridView.

In Above Code, we Automatically Generated Columns from DataSource Then AllowPaging = True, so that GridView Data can be Paged, Also We defined PageSize that what amount of Records whould display in Page.
To Apply Pagination, RIght Click in GridView and Choose Properties > Events. Choose PageIndexChanged event and Place Following code in ASPX.CS Page.
Now Check on your Page. What is Happening on Clicking Page Number. You can comment if some queries on above code.
John Bhatt

About John Bhatt

Aka, Prithvi Raj Bhatt, A Proud Nepali, Blogger, Software Developer, ASP.NET, Web Designer & Developer, Faculty and a Troubleshooter blog @PRsBlog

Check Also


Searching GridView Data in ASP.NET

Hi, Today, when visiting a community website, I found below article left unpublished with some …

Leave a Reply

Your email address will not be published. Required fields are marked *