Server Error in '/ASPNET_Test' Application.
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: BC30084: 'For' must end with a matching 'Next'.
Source Error:
Line 4:
Line 5: <%
Line 6: for (int i = 0; i < 5; i++)
Line 7: {
Line 8: Response.Write("# " + i);
Source File: G:\Websites\ASPNET_Test\text.aspx Line: 6
Show Detailed Compiler Output:
C:\WINDOWS\system32> "c:\windows\microsoft.net\framework\v1.1.4322\vbc.exe" /t:library /utf8output /R:"c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll" /R:"c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll" /R:"c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll" /R:"c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll" /R:"c:\windows\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\system.web.services.dll" /R:"c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll" /R:"c:\windows\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\system.web.mobile.dll" /R:"c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll" /out:"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\aspnet_test\26bad6e1\aa574057\nv-wys3j.dll" /debug- "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\aspnet_test\26bad6e1\aa574057\nv-wys3j.0.vb"
Microsoft (R) Visual Basic .NET Compiler version 7.10.6001.4
for Microsoft (R) .NET Framework version 1.1.4322.2032
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.
G:\Websites\ASPNET_Test\text.aspx(6) : error BC30084: 'For' must end with a matching 'Next'.
for (int i = 0; i < 5; i++)
~~~~~~~~~~~~~~~~~~~~~~~~~~~
G:\Websites\ASPNET_Test\text.aspx(6) : error BC30516: Overload resolution failed because no accessible 'Int' accepts this number of arguments.
for (int i = 0; i < 5; i++)
~~~
G:\Websites\ASPNET_Test\text.aspx(6) : error BC30198: ')' expected.
for (int i = 0; i < 5; i++)
~
G:\Websites\ASPNET_Test\text.aspx(7) : error BC30035: Syntax error.
{
~
G:\Websites\ASPNET_Test\text.aspx(8) : error BC30451: Name 'i' is not declared.
Response.Write("# " + i);
~
G:\Websites\ASPNET_Test\text.aspx(8) : error BC30037: Character is not valid.
Response.Write("# " + i);
~
G:\Websites\ASPNET_Test\text.aspx(9) : error BC30035: Syntax error.
}
~
Reason: There is nothing wrong with the test code. I simply used the wrong page directive. And looks like VB is the default language if you don't specify one.
Fix: <@ Page Language="C#" @> should have been <%@ Page Language="C#" %>

0 Comments:
Post a Comment
<< Home