how to create my own namespace [closed]
how to create my own namespace of database connectivity in a project and use in .cs file of every .aspx page ??
Current answer
Add your namespace to web.config, system.web section
<system.web>
<pages>
<namespaces>
<add namespace="mynamespace"/>
</namespaces>
</pages>
...
now mynamespace classes are visible on every aspx page.
.
Old answer (was given on vague question)
Try in solution explorer: Project (mouse right button click) -> Properties -> Default Namespace.
Don't forget to change current page(s) namespace (Resharper will help you)
精彩评论