Hi,
I have followed the first article :
Accessing MySQL Database with ASP.NET
It was a breeze and very simple to follow. What a great article !!!
I then tried the next article:
Viewing/Adding/Editing/Removing Records from MySQL using ASP.NET DataGrid control
Which again was easy to follow until I came to run the editnames.aspx ASP.NET page.
I keep getting the following error:
Server Error in '/mons' Application. (my virtual directory on iis)
-----------------------------------------
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request.
Please review the following specific error details and modify your source code appropriately.
Compiler Error Message:
CS0117: 'System.Web.UI.WebControls.DataGridItem' does not contain a definition for 'Findcontrol'
Source Error:
Line 102: {
Line 103: case "Delete":
Line 104: Literal literal1 = (Literal)e.Item.Findcontrol("Literal1");
Line 105: DoDeleteName(Convert.ToInt32(literal1.Text));
Line 106: BindDataGrid();
Source File: C:\Inetpub\wwwroot\test\editnames.aspx Line: 104
Show Detailed Compiler Output:
C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.1.4322\csc.exe" /t:library /utf8output /R:"c:\winnt\microsoft.net\framework\v1.1.4322\mscorlib.dll" /R:"c:\winnt\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll" /R:"c:\winnt\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll" /R:"c:\winnt\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll" /R:"c:\winnt\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\system.web.mobile.dll" /R:"c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll" /R:"c:\winnt\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\system.web.services.dll" /R:"c:\winnt\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll" /R:"c:\winnt\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll" /out:"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\mons\9c804586\df8480e\r_hos5eb.dll" /debug- /optimize+ /win32res:"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\mons\9c804586\df8480e\r_hos5eb.res" /warnaserror /w:1 "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\mons\9c804586\df8480e\r_hos5eb.0.cs"
Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.
C:\Inetpub\wwwroot\test\editnames.aspx(104,37): error CS0117: 'System.Web.UI.WebControls.DataGridItem' does not contain a definition for 'Findcontrol'
C:\Inetpub\wwwroot\test\editnames.aspx(124,33): error CS0117: 'System.Web.UI.WebControls.DataGridItem' does not contain a definition for 'Findcontrol'
C:\Inetpub\wwwroot\test\editnames.aspx(125,33): error CS0117: 'System.Web.UI.WebControls.DataGridItem' does not contain a definition for 'Findcontrol'
C:\Inetpub
I would really appreciate any help that could be given.
Thanks
Mons.