all groups > dotnet clr > april 2006 >
You're in the

dotnet clr

group:

problem with namespaces in VB.Net (2.0)


problem with namespaces in VB.Net (2.0) Tim_Mac
4/13/2006 6:44:19 AM
dotnet clr:
hi,
i have an aspx page in a web project, which loads a user control
dynamically. (by the
way i don't have any problems using namespaces in C# web projects, this
seems to be just a VB thing).

the user control is in a sub-directory, and i cannot refer to the type
of the control to access its properties and methods. when i move the
control to the root directory then it works fine. this happens without
any use of namespaces.

i tried adding a namespace to the page and usercontrol but it
still doesn't work, i cannot even import the user control namespace
from within the code behind of the page. all the classes are marked
public, and i have tried all sorts of combinations with the same
namespaces, different namespace for the subfolder etc. but it always
ends up the same. when i recompile the project, it says "Type 'xyz' is
not defined".

any ideas why this is so unreasonably difficult?
thanks
tim
RE: problem with namespaces in VB.Net (2.0) Guffa
4/20/2006 10:28:01 AM
I had the same problem yesterday, and finally found the namespace.

Re: problem with namespaces in VB.Net (2.0) Tim_Mac
4/20/2006 10:45:17 AM
hi,
thanks for the reply. my problem was that i didn't know you had to
manually refer to any other page or user control you wanted to
reference.
<%@ Add reference etc...

i must say i'm not a big fan of the default web deployment in .net 2.0.
i usually end up using the web deployment add-on.

thanks
tim
AddThis Social Bookmark Button