开发者

how to create my own namespace [closed]

开发者 https://www.devze.com 2023-01-18 05:32 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably a开发者_JAVA百科nswered in its current form.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably a开发者_JAVA百科nswered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

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)

0

精彩评论

暂无评论...
验证码 换一张
取 消