CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2002
    Posts
    34

    Multiple Namespaces

    I'm sure there is a simple answer to this question but I don't know it.

    If you create a webservice called service it puts the directory service in the web root and \bin inside of that.

    If I put a aspx file in the root it will not work however if I put in in the \service directory it will work. So far this hasn't been a problem I just put the file in the directory. However now I have come across a situation where I need to use two namespaces lets say I need an aspx file in service to use a namespace in ..\servicetwo.

    Is it possible to does this. Is there a simple way such as the way you Import the namespace in the aspx file instead of me having to jig all the files around and change all the other files that call them?

  2. #2
    Join Date
    Oct 1999
    Location
    Colorado
    Posts
    288
    at the top of your aspx page use a import directive

    <%@ Import NameSpace="thenameSpacetoImport" %>

    and thats it....then in your code behind page you can either write out the fully qualified name like:

    thenameSpacetoImport.ClassName var;

    or you can use the using directive

    using thenameSpacetoImport;

    ClassName var;

    Matt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured