Statement cannot appear within a method body. End of method assumed
Today when I was developing web pages using asp.net,I encountered a problem as below:
Server Error in ‘/BC30289‘ 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:
BC30289: Statement cannot appear within a method body. End of method assumed.
Error Line: Sub showImage(Byval id as string)
I replaced “<% %>” with
<script language=”vbscript” runat=”server”></script>
And then everything works fine.
That is because we cannot define asp ‘sub’ or ‘function’ between the body tag
–
Happy Programming
Forums for Microsoft .NET developers
Hi begginers to Microsoft.NET world, here a list of forums and educational sites where you can post your queries and get ur answers from professionals. this may help you to increase your knowledge and also help if u stuck with some issues…become a regular member(its free) so that source code access is easy ….and also contibute wen u have enough greymatter to solve complex issues of .NET. Comment on this post and add more forums which i might have missed …..
-
Archives
- April 2011 (1)
- May 2010 (1)
- April 2010 (1)
- February 2010 (3)
- January 2010 (5)
- December 2009 (6)
- November 2009 (13)
- October 2009 (10)
- September 2009 (6)
- August 2009 (7)
- July 2009 (7)
- June 2009 (3)
-
Categories
-
RSS
Entries RSS
Comments RSS