473,485 Members | 1,397 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

No Namespace Specified - Where Do the Types Live?

I just converted an ASP.NET Web Site to be an ASP.NET Web Application
project type in Visual Studio 2005. After the conversion, the whole thing
still works - it builds and the Web app runs just fine. However, none of the
classes are placed explicitly in any namespace. The ASP.NET Web Site project
type apparentlyl infers namespace from the site's directory structure. But
Visual Studio's conversion process ("Convert to Web Application") does not
explicitly add any namespaces to any of the classes.

So, where do the classes live after the conversion? Is there some "default"
or "global" namespace into which the classes are placed? Just curious... I'm
not trying to solve any specific runtime problem here.

Thanks.
Nov 17 '08 #1
3 1290
re:
!So, where do the classes live after the conversion?

In the VS 2005 or 2008 IDEs, right-click your Project's name in the Solution Explorer,
select "Properties", then click on the Application menu on the left.

In 2008, you'll see a textbox for the "default namespace";
in 2005, the textbox is named "root namespace".

Set them to whatever you'd like the default/root namespace to be.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Johnson" <A@B.comwrote in message news:up**************@TK2MSFTNGP03.phx.gbl...
>I just converted an ASP.NET Web Site to be an ASP.NET Web Application project type in Visual Studio 2005. After the
conversion, the whole thing still works - it builds and the Web app runs just fine. However, none of the classes are
placed explicitly in any namespace. The ASP.NET Web Site project type apparentlyl infers namespace from the site's
directory structure. But Visual Studio's conversion process ("Convert to Web Application") does not explicitly add any
namespaces to any of the classes.

So, where do the classes live after the conversion? Is there some "default" or "global" namespace into which the
classes are placed? Just curious... I'm not trying to solve any specific runtime problem here.

Thanks.

Nov 17 '08 #2
On Nov 17, 10:50*am, "Johnson" <A...@B.comwrote:
I just converted an ASP.NET Web Site to be an ASP.NET Web Application
project type in Visual Studio 2005. After the conversion, the whole thing
still works - it builds and the Web app runs just fine. However, none of the
classes are placed explicitly in any namespace. The ASP.NET Web Site project
type apparentlyl infers namespace from the site's directory structure. But
Visual Studio's conversion process ("Convert to Web Application") does not
explicitly add any namespaces to any of the classes.

So, where do the classes live after the conversion? Is there some "default"
or "global" namespace into which the classes are placed? Just curious... I'm
not trying to solve any specific runtime problem here.

Thanks.
Hi,

They will live inside teh namespace defined by your project.
Do this test, add a new webform and see where it place it, most
probably you will see the class beind declared inside the namespace as
you expected
Nov 17 '08 #3
On Nov 17, 11:24*am, "Juan T. Llibre" <nomailrepl...@nowhere.com>
wrote:
re:
!So, where do the classes live after the conversion?

In the VS 2005 or 2008 IDEs, right-click your Project's name in the Solution Explorer,
select "Properties", then click on the Application menu on the left.

In 2008, you'll see a textbox for the "default namespace";
in 2005, the textbox is named "root namespace".

Set them to whatever you'd like the default/root namespace to be.

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
======================================
Hi Juan,

Nice seeing you around, been a while since we last talked to each
other.
Hope everything is ok with you.
cheers,
Ignacio.
Nov 17 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1940
by: Fritz Bosch | last post by:
Hi experts Is is possible to import/manipulate a module such that I can supply its __dict__? I want to supply my own dict subclass object to be filled by the import, e.g. a class like: >>>...
3
4339
by: Kunle Odutola | last post by:
I have a database that tracks players for children's sports clubs. I have included representative DDL for this database at the end of this post. A single instance of this database supports...
1
2210
by: Steve George | last post by:
Hi, I have a scenario where I have a master schema that defines a number of complex and simple types. I then have a number of other schemas (with different namespaces) where I would like to reuse...
2
2464
by: Stanimir Stamenkov | last post by:
I'm trying to find out if it is permissible to include a schema document with absent target namespace to a schema with specified target namespace, and if it is, what are the rules to resolve the...
2
3968
by: Michal Januszczyk | last post by:
I have a very simple XML document. <SmtpGatewayRules xmlns="http://www.foo.com/schema.xsd"> <rules> <rule> </rule> </rules> </SmtpGatewayRules> When no xmlns is specified I can find rule...
9
2916
by: MDoyle | last post by:
Here is the easiest question you’ll get all day from a complete newbie. I installed Visual Studio on my laptop last night and have been tryin to write my very first C# programs this morning. I’m...
0
1378
by: rob | last post by:
I have two projects (dlltest, dll2) both creating a dll. The two dlls define classes (dll1, dll2) within the same namespace (MyNamespace). One of the dlls (dlltest) is using functionality of the...
5
464
by: ad | last post by:
Is there any difference about namespace between VB.NET and C#. All functions in c# must include in a namespace. Why I can't find namespace in the files .vb . How VB.NET implement the...
0
2111
by: robert | last post by:
Hi all, I'm having a hard time resolving a namespace issue in my wsdl. Here's an element that explains my question, with the full wsdl below: <definitions name="MaragatoService"...
3
5456
by: Johnson | last post by:
I just converted an ASP.NET Web Site to be an ASP.NET Web Application project type in Visual Studio 2005. After the conversion, the whole thing still works - it builds and the Web app runs just...
0
7090
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7161
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6825
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7275
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4551
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3058
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3063
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1376
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
595
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.