自定义分页在ListView Asp.Net中不起作用

自定义分页在ListView Asp.Net中不起作用,asp.net,listview,custom-paging,Asp.net,Listview,Custom Paging,在编写下面的代码时,我遇到了这样一个错误:无法找到ListViewPageEventsArgs 我已将以下代码添加到模板中: OnPageIndexChanging="lvListScreen_PageIndexChanging" 你们知道我为什么会有这个错误吗?我不知道你们从哪里得到这个代码片段,但是列表视图没有OnPageIndexChanging,而是OnPagePropertiesChanging。谢谢。根据您的建议,我添加了受保护的void lvListScreen_PagePro

在编写下面的代码时,我遇到了这样一个错误:无法找到
ListViewPageEventsArgs

我已将以下代码添加到模板中:

OnPageIndexChanging="lvListScreen_PageIndexChanging"

你们知道我为什么会有这个错误吗?

我不知道你们从哪里得到这个代码片段,但是列表视图没有
OnPageIndexChanging
,而是
OnPagePropertiesChanging
。谢谢。根据您的建议,我添加了受保护的void lvListScreen_PagePropertiesChange(对象发送者,PagePropertiesChangingEventArgs e){(lvListScreen.FindControl(“CustomPager1”)作为控件_CustomPager)。SetPageProperties(e.StartRowIndex,e.MaximumRows,false);this.BindListScreenView(转换为Int32(Request.QueryString[“pg]”)}您好,现在我唯一的问题是,每当我从DDL更改页面大小时,我就会丢失页面开始索引计算,该计算是Convert.ToString((micurridex*Convert.ToInt32(ddlPageSize.SelectedValue))-10+1);