ComponentProblemWrox
When I try and run the Hello World component in chapter 16 of the book: "Beginning ASP.NET 1.0 with Visual Basic.NET"
I get the following error:
WroxComponents.HelloVB' is not defined
What am I missing?
Here is the code for UseMyFirstComponent.aspx:
<%@ Import Namespace="WroxComponents" %>
<html>
<head><title>My First Component Example</title></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()
End Sub
</script>
</body>
</html>
Here is the code for MyFirstComponent.
vb located in C:\Inetpub\wwwroot\WroxCode\ch16. I compiled it from the command line with the following .bat file
set indir=C:\inetpub\wwwroot\wroxcode\ch16\MyFirstComp onent.
vb
set outdir=C:\inetpub\wwwroot\wroxcode\ch16bin\MyFirst Component.dll
vbc /t:library /out:%outdir% %indir%
pause
to MyFirstComponent.dll in the C:\Inetpub\wwwroot\WroxCode\ch16\bin folder
MyFirstComponent.
vb is below â¦
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
********************_
I'm not using WebMatrix or VS. I'm trying to "use" the component described in chapter 16 of the book: "Beginning ASP.NET 1.0 with Visual Basic.NET"