Live Chat Icon For mobile
Live Chat Icon

How can I show what page the user is on using in-built paging functionality. CurrentPageIndex Property Shows Up as 0

Platform: ASP.NET| Category: DataGrid

In PageIndexChanged event write

VB.NET


Dim pageindex As Integer = DataGrid1.CurrentPageIndex + 1
LblPageInfo.Text = 'Page ' + pageindex.ToString() + ' of ' + DataGrid1.PageCount.ToString() 

C#


int pageindex = DataGrid1.CurrentPageIndex + 1 ;
LblPageInfo.Text = 'Page ' + pageindex.ToString() + ' of ' + DataGrid1.PageCount.ToString()  ;

Share with

Share on twitter
Share on facebook
Share on linkedin