Wrox Programmer Forums
BOOK: Beginning ASP.NET 1.0
This is the forum to discuss the Wrox book Beginning ASP.NET 1.0 with C# by Chris Goode, John Kauffman, Christopher L. Miller, Neil Raybould, S. Srinivasa Sivakumar, Dave Sussman, Ollie Cornes, Rob Birdwell, Matt Butler, Gary Johnson, Ajoy Krishnamoorthy, Juan T. Llibre, Chris Ullman; ISBN: 9780764543708
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 1.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 10th, 2004, 11:25 AM
Ed Ed is offline
Registered User
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using Components - Beginning ASP.NET


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" %>

<head><title>My First Component Example</title></head>

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()
End Sub


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%

 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"
Old September 11th, 2004, 05:56 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post

Did you check if the dll exists under BIN folder?

If not, this could be the problem, Looks like you are missing a \ below before BIN.
set outdir=C:\inetpub\wwwroot\wroxcode\ch16\bin\MyFirstComponent.dll

Check if that helps.

- Vijay G
Strive for Perfection

Similar Threads
Thread Thread Starter Forum Replies Last Post
Office Web Components (OWC) 11 - and ASP.Net dietmar.zilz Classic ASP Professional 1 January 26th, 2005 04:28 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.