简体   繁体   English

DataPager值设置和VB.net获取

[英]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? 在导航ListView控件时,是否有某种方法可以捕获/获取Data Pager前进到单击Next或Previous记录的按钮上的值?

And what about telling the pager which page to display programmatically? 告诉分页器以编程方式显示哪个页面呢?

you should use the PagePropertiesChanging event to get current page 您应该使用PagePropertiesChanging事件获取当前页面

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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