我在我的asp.net webform中有gridview。錯誤在gridview時allowPaging = true - asp.net
我結合我的數據庫的GridView這樣的:
SQL = "SELECT id,Fname,Lname FROM MEN";
dsView = new DataSet();
adp = new SqlDataAdapter(SQL, Conn);
adp.Fill(dsView, "MEN");
adp.Dispose();
GridView1.DataSource = dsView.Tables[0].DefaultView;
GridView1.DataBind();
,這我把在GridView:allowPaging = true
其顯示的數據網格,但如果我按到第2頁.. 3 ..
,我得到這個錯誤:
The GridView 'GridView1' fired event PageIndexChanging which wasn't handled.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The GridView 'GridView1' fired event PageIndexChanging which wasn't handled.
在此先感謝
謝謝!我嘗試它,沒有錯誤,但如何顯示下一個10 ... 20 ....記錄? – Gali 2011-01-19 18:33:50