出现的异常如下:
“/WebFileManage”应用程序中的服务器错误。
--------------------------------------------------------------------------------无效的 CurrentPageIndex 值。它必须大于等于 0 且小于 PageCount。 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的更多信息。 异常详细信息: System.Exception: 无效的 CurrentPageIndex 值。它必须大于等于 0 且小于 PageCount。源错误: 
行 160:
行 161: myDataGrid.DataSource=ds.Tables["sendfile"].DefaultView;
行 162: myDataGrid.DataBind();
行 163: }
行 164:
 源文件: d:\inetpub\wwwroot\webfilemanage\userpage.aspx.cs    行: 162 堆栈跟踪: 
[Exception: 无效的 CurrentPageIndex 值。它必须大于等于 0 且小于 PageCount。]
   System.Web.UI.WebControls.DataGrid.CreateControlHierarchy(Boolean useDataSource)
   System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e)
   System.Web.UI.WebControls.BaseDataList.DataBind()
   WebFileManage.userpage.BindGrid() in d:\inetpub\wwwroot\webfilemanage\userpage.aspx.cs:162
   WebFileManage.userpage.query_Click(Object sender, EventArgs e) in d:\inetpub\wwwroot\webfilemanage\userpage.aspx.cs:180
   System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   System.Web.UI.Page.ProcessRequestMain() 
--------------------------------------------------------------------------------
版本信息: 运行时版本:1.0.2914.16; ASP.NET 版本:1.0.2914.16 但此时myDataGrid.CurrentPageIndex=20,并没有小于0,或大于PageCount.