开发者

How to identify which Page number was clicked in DataPager

开发者 https://www.devze.com 2023-02-24 19:10 出处:网络
I have a listview and DataPager control. Now when I click a page number on the DataPager, the ListView1_PagePropertiesChanging(object

I have a listview and DataPager control. Now when I click a page number on the DataPager, the

ListView1_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e)

event is fired. Now, I would like to identify which page number of the D开发者_高级运维ataPager was clicked. For example, if Page 3 was clicked, then I would like to get the value 3. How can I do this?

Thanks in advance.


you can try a code like this.

  protected void ListView1_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e)
    {
        int pageindex = e.StartRowIndex / e.MaximumRows;
    }


The PagePropertiesChangingEventArgs as members that have some of the information you might need

0

精彩评论

暂无评论...
验证码 换一张
取 消