我正在尝试从一页导航到另一页gridview
。当我尝试出错时
Compiler Error Message: CS0123: No overload for 'GridView1_PageIndexChanging'
matches delegate 'System.Web.UI.WebControls.GridViewSelectEventHandler'
我的 ASPX 页面:
<pagersettings mode="Numeric" position="Bottom" pagebuttoncount="10"/>
<pagerstyle backcolor="LightBlue" height="30px" verticalalign="Bottom" horizontalalign="Center"/>
</asp:GridView>
我在 C# 中的代码:
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
GridView1.DataBind();
}
请帮帮我。