Reputation: 12038
Hi all I've just started a new project using Visual Web Developer 2008 Express and all my code behinds are not in any namespace. How can I set the default namespace for the project?
In VisualStudioPro it used to be in project properties, the website properties in Visual Web Developer 2008 Express seem very ... express.
Thanks,
David.
Upvotes: 1
Views: 2198
Reputation: 422320
Visual Web Developer (prior to 2008 SP1) does not support Web Application projects. Default namespace is only available in Web Application projects.
If you really want to add your classes to a namespace, you should do it manually (the namespace surround with code snippet can prove pretty useful) by enclosing them in a namespace statement:
namespace MyDefaultNamespace {
// original code
}
Upvotes: 2
Reputation: 15262
If you are using the Website Project Template, then namespaces aren't used. If this is the case, consider using the Web Application Project Template.
Upvotes: 1
Reputation: 105
Do Find and Replace to find your namespace and replace it with what you want.
Upvotes: 0