You haven't wired up the event handler to the event on the grid.
According to the error, your grid has an ID of "GridView2". If you're using
AutoEventWireup
, then the handler name would need to be
GridView2_PageIndexChanging
:
protected void GridView2_PageIndexChanging(object sender, GridViewPageEventArgs e)
If you're
not using
AutoEventWireup
, then you'll need to add the handler in the markup:
<asp:GridView ID="GridView2" runat="server" OnPageIndexChanging="grdView_PageIndexChanging" ...