When I try and run the Hello World component in chapter 13 I get the following error:
WroxComponents.HelloVB' is not defined
I get the same error when I try and run the downloaded version.
What am I missing?
Here is the code for HelloWorldExample.aspx:
<%@ Page Language="
VB" %>
<script runat="server">
Sub Page_Load
Dim MyVBComponent as New WroxComponents.HelloVB()
lblMessage.Text = MyVBComponent.SayHello()
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<p>Our component says:</p>
<p><asp:Label id="lblMessage" runat="server" /></p>
</form>
</body>
</html>
Here is the code for HelloWorld.
vb this is compiled to HelloWorld.dll:
' HelloWorld.
vb
'
Imports System
Namespace WroxComponents
Public Class HelloVB
Public Sub New()
End Sub
Public Function SayHello() As String
Return "Hello World - I'm a
VB.NET component!"
End Function
End Class
End Namespace