private void wlkclistgrid_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
this.wlkclistgrid.CurrentPageIndex=e.NewPageIndex;

this.bind();//必须有

}
//==========定义绑定方法bind()
public void bind()
{

try
{
ds.Clear();
string connstr = ConfigurationSettings.AppSettings ["wlkcdb"].ToString ();
myConnection = new OleDbConnection(connstr);

string sqlstr="select * from WLKC where KCLB='"+this.Session["kclb"].ToString()+"'";

dp=new OleDbDataAdapter(sqlstr,myConnection) ;
this.myConnection.Open();
dp.Fill(ds,"wlkc");//传递给“网络课程”表
this.wlkclistgrid.DataSource = ds.Tables["wlkc"].DefaultView;
this.wlkclistgrid.DataBind();
this.myConnection.Close();

}
catch 
{
Response.Redirect ("database-error.htm");
}
}