DataPager value setting and getting with VB.net

419 views Asked by At

Is there some way to trap/get the value that a Data Pager advances to on the button click for Next or Previous record when navigating a ListView control?

And what about telling the pager which page to display programmatically?

1

There are 1 answers

1
Morten Anderson On

you should use the PagePropertiesChanging event to get current page

Protected Sub ListView1_PagePropertiesChanging(sender As Object, e As PagePropertiesChangingEventArgs)
  Dim CurrentPage As Integer = (e.StartRowIndex / e.MaximumRows) + 1
  Response.Write(CurrentPage.ToString())
End Sub