Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: Re: BC30002: Type is not defined


Message #1 by "SweRajan" <swerajan@y...> on Tue, 23 Apr 2002 17:14:38
Hai,

   Please let me know how code behind code is compiled into the dll file  
by using Command line compilers. Because i have xyz.vb file which contains 
the namespace. When I open the aspx file in the browser it shows the 
following error:


error BC30002: Type 'xyzVB.xyz' is not defined.

        Dim D As xyzVB.xyz = New xyzVB.xyz()
                ~~~~~~~~~~~~~~~~~~~~~~~~~                                  
x:\xyzclient.aspx(22) : error BC30002: Type 'DataServiceVB.DataService' is 
not defined.
 Dim D As DataServiceVB.DataService = New DataServiceVB.DataService()
           ~~~~~~~~~~~~~~~~~~~~~~~~~                                  
error BC30466: Namespace or type 'xyzVB' for the Imports 'xyzVB' cannot be 
found.

Imports xyzVB
        ~~~~~

Thanx in Advance,
  Swe


> Morgan is right you need to make sure you import that namespace.  In 
> addition.  The user control and it's code behind code must be compiled 
> into a dll and that dll must be placed in the bin directory, not the vb 
> source (that may have been what you ment, but I thought I should metion 
it 
> just in case.)  If you are using vs.net, performing a "build" will do 
this 
> automatically.  If you are using the command line compilers, let me know 
> and I'll try to dig up the batch file I was using to compile before I 
got 
> vs.net.
> > Randy,
> > 
> > did you remember to Import the class into your user control?
> > Kinda sounds like you forgot that little part.
> > 
> > 
> > Morgan
> > 
> > 
> > 
> > > Hello ASP.NET Gurus,
> > > 
> > > I have been reading the WROX book "Professional ASP.NET".  It's a 
> great 
> > > book, but I can't seem to find the answer I am looking for.  I am 
> > creating 
> > > an ASPX page that uses a User Control with Code Behind (the user 
> > > control).  That code behind the user control is referencing a class 
I 
> > have 
> > > written named MenuItemsDB.  My namespace for my MenuItemsDB.vb file 
> > which 
> > > I have placed in the BIN folder is ClickitXpress.  Here is the line 
> (50)
> > > (when I browse) the page blows up on:
> > > 
> > > ---------Error Message----------
> > > BC30002: Type is not defined: 'ClickitXpress.MenuItemsDB'
> > > ---------Error Message----------
> > > 
> > > ---------Code-------------------
> > > Line 48: 
> > > Line 49:     ' Obtain list of Menu records and databind to list 
control
> > > Line 50:     Dim MenuItems As ClickitXpress.MenuItemsDB = New 
> > > ClickitXpress.MenuItemsDB()
> > > Line 51: 
> > > Line 52:     MenuList.DataSource = MenuItems.GetMenuByGroup()
> > > ---------Code-------------------
> > > 
> > > The code you are looking at is inside of Code Behind page for the 
User 
> > > Control.  Any ideas why I am getting this error message.  I know 
it's 
> > > probably a simple fix, but I can't find any documentation on this 
> error 
> > > number or message.  Common I know you guys can figure this one out, 
> > real 
> > > easy.
> > > 
> > > Thanks, in advance...
> > > 
> > > Randy

  Return to Index