I wonder how to use namespaces in asp.net c# project?
I am prepend in classes defined in AppCode
namespace MyNamespace
{
class code My Class
{
}
}
If i do so then I see that in a view where I use this class must include this namespace(of course). Can’t I include this in webconfig to include it all over?
Update:
The reason I want to use namespaces is because I want to create a dll file of files from AppCode so application will run quicker. Even though I see that no dll is built when I build the site.
If you are using a Web Application and have a Class or ClassLibrary and want to call this class in your code behind “.asc” .
You can Add Reference in the WebApplication, so you choose the Class in Project tab.
Then u can call : using Class.namespace …