分页错误,帮看看
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。
编译器错误信息: CS0120: 非静态的字段、方法或属性“System.Web.UI.WebControls.DataGrid.CurrentPageIndex”要求对象引用
源错误:
行 203:
行 204: void DataGrid1_SelectedIndexChanged(object sender, EventArgs e) {
行 205: DataGrid.CurrentPageIndex=e.NewPageIndex;
行 206: DataBind();
行 207: }
源文件: E:\wwwroot\test_2.aspx 行: 205
显示详细的编译器输出:
C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.1.4322\csc.exe" /t:library /utf8output /R:"c:\winnt\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll" /R:"c:\winnt\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll" /R:"c:\winnt\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\mscorlib.dll" /R:"c:\winnt\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll" /R:"c:\winnt\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll" /R:"c:\winnt\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\system.web.services.dll" /R:"c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll" /R:"c:\winnt\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\system.web.mobile.dll" /out:"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\matrixtur\51e4a29f\f8096ab8\1coh0h68.dll" /D:DEBUG /debug+ /optimize- /warnaserror /w:1 "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\matrixtur\51e4a29f\f8096ab8\1coh0h68.0.cs"
Microsoft (R) Visual C# .NET 编译器版本 7.10.3052.4
用于 Microsoft (R) .NET Framework 版本 1.1.4322
版权所有 (C) Microsoft Corporation 2001-2002。保留所有权利。
E:\wwwroot\test_2.aspx(205,9): error CS0120: 非静态的字段、方法或属性“System.Web.UI.WebControls.DataGrid.CurrentPageIndex”要求对象引用
E:\wwwroot\test_2.aspx(205,35): error CS0117: “System.EventArgs”并不包含对“NewPageIndex”的定义