I keep getting the following error:
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.
Source Error:
Line 57: #End ExternalSource
Line 58:
Line 59:
Public Sub New()
Line 60: MyBase.New
Line 61: Dim dependencies As System.Collections.ArrayList
Source File: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Tempo rary ASP.NET Files\begaspnet\4f6b9c63\3003fd62\xv5yhavk.0.
vb Line: 59
************************************************** ******************
I have the dll file in the bin folder under my app path -- BegASPNET\bin\MyFirstComponent.dll which was compiled with the following bat file:
CompileMyFirstComponent.bat
*********************
set indir=f:\BegASPNET\ch16\MyFirstComponent.
vb
set outdir=f:\BegASPNET\bin\MyFirstComponent.dll
vbc /t:library /out:%outdir% %indir%
pause
***********************
here is my source code:
******************************************
Namespace WroxComponents
Public Class HelloVB
Public Function SayHello() as String
Return "Hello World - I'm a
VB.NET Component!"
End Function
End Class
End Namespace
********************************************
<%@Import Namespace="WroxComponents" %>
<html>
<head><title>My First Component</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio.NET 7.0">
</head>
<body>
Our component says: <br/><br/>
<asp:Label ID="label1" Runat="server"/>
<script language="
vb" runat="server">
Sub Page_Load(Source As Object, E as EventArgs)
Dim VBComponent as New HelloVB()
label1.text = VBComponent.SayHello()
</script>
</body>
</html>
any help would be appreciated
Thanks
Chris