R – Can you create a web user control in a application project outside of the project’s default namespace

asp.netnamespacesuser-controls

I have a web user control (ascx) in my project and I would like to move it to a more general namespace that makes it easier to share the control across projects.

The problem is, it seems that web user controls like to stay in a namespace named after the web application they're in.

Is there some way to break out of the web app namespace?

Update: Looks like you can in C#, but it's not working in VB.Net.

Best Answer

Grr...looks like the answer is no.

http://msdn.microsoft.com/en-us/library/0dx91cw5(VS.80).aspx Possible to override VB.NET root namespace?

VB will automatically use the default namespace in any declaration. The only way around it seems to be to declare the default as blank and specify the namespace in every place.