How to identify which Page number was clicked in DataPager
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
精彩评论