简体   繁体   中英

DataPager value setting and getting with VB.net

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM