开发者

how to create my own namespace [closed]

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜