请教高手GridView在继承母版的页面中翻页的问题
我把GRIDVIEW放在了继承了母版的页面中,点击查询显示第一页的时候可以正常显示,但点击其他页面后就查询不到数据了,跟踪了以下好像是下边的过程根本就没执行,那位老大给指点下啊,拜谢啦。protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
SetBind();
}
protected void SetBind()
{
DataSet ds = new DataSet();
OracleConnection Conn = new OracleConnection(SqlStr);
OracleCommand cmd = new OracleCommand(SqlStr, Conn);
OracleDataAdapter DataAdp = new OracleDataAdapter(cmd);
Conn.Open();
DataAdp.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
DataAdp.Dispose();
ds.Dispose();
Conn.Dispose();
}
--------------------编程问答-------------------- <asp:GridView id=GridView1 OnPageIndexChanging="GridView1_PageIndexChanging" //这个定义没 --------------------编程问答-------------------- --------------------编程问答-------------------- OnPageIndexChanged事件有木有 貌似写在这里 --------------------编程问答-------------------- 给Gridview注册OnPageIndexChanging
补充:.NET技术 , ASP.NET