Namespace Question - Asp.Net 2.0

Discussion in 'ASP .Net' started by Matthias, Feb 22, 2008.

  1. Matthias

    Matthias Guest

    hi there,

    i've currently moved from asp.net 1.1 to 2.0 and i don't get the new
    namespace thing:

    all pages, controls etc. in my web application are not wrapped into a
    any namespace as it was in 1.1. now here is my problem. i've got quite a
    view classes located in my App_Code directory. i'd like to put them into
    namespaces for better organization (Localization, BOL, DAL, etc.). if i
    do so, adding a using directive to my default.aspx.cs and hoping i could
    use any of the classes wouldn't work.

    how do i cope with this? any reading available? any hints?

    thanks in advance, matthias
     
    Matthias, Feb 22, 2008
    #1
    1. Advertising

  2. "Matthias" <> wrote in message
    news:%23IoK$...
    > hi there,
    >
    > i've currently moved from asp.net 1.1 to 2.0 and i don't get the new
    > namespace thing:
    >
    > all pages, controls etc. in my web application are not wrapped into a any
    > namespace as it was in 1.1. now here is my problem. i've got quite a view
    > classes located in my App_Code directory. i'd like to put them into
    > namespaces for better organization (Localization, BOL, DAL, etc.). if i do
    > so, adding a using directive to my default.aspx.cs and hoping i could use
    > any of the classes wouldn't work.
    >
    > how do i cope with this? any reading available? any hints?
    >
    > thanks in advance, matthias


    I don't really remember 1.1, but in 2.0 you can definitely wrap your classes
    inside different namespaces and still access them from your code-behind.
    What makes you think that you cannot?
     
    Scott Roberts, Feb 22, 2008
    #2
    1. Advertising

  3. Matthias

    Matthias Guest

    hey scott,

    thanks for your reply. i've found the problem already: i wrapped my
    classes in the App_Code directory into various namespaces and made them
    all "internal", because i thought it anyway gets all compiled into the
    same assembly (as it was in 1.1). changing their scope to public solved
    the problem.

    thanks again for reading my post and taking the time to answer. i
    appreciate this.

    matthias

    Scott Roberts schrieb:
    >
    > "Matthias" <> wrote in message
    > news:%23IoK$...
    >> hi there,
    >>
    >> i've currently moved from asp.net 1.1 to 2.0 and i don't get the new
    >> namespace thing:
    >>
    >> all pages, controls etc. in my web application are not wrapped into a
    >> any namespace as it was in 1.1. now here is my problem. i've got quite
    >> a view classes located in my App_Code directory. i'd like to put them
    >> into namespaces for better organization (Localization, BOL, DAL,
    >> etc.). if i do so, adding a using directive to my default.aspx.cs and
    >> hoping i could use any of the classes wouldn't work.
    >>
    >> how do i cope with this? any reading available? any hints?
    >>
    >> thanks in advance, matthias

    >
    > I don't really remember 1.1, but in 2.0 you can definitely wrap your
    > classes inside different namespaces and still access them from your
    > code-behind. What makes you think that you cannot?
     
    Matthias, Feb 22, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Èý¹â
    Replies:
    1
    Views:
    574
    William F. Robertson, Jr.
    Jul 29, 2003
  2. Replies:
    0
    Views:
    5,137
  3. Anonymous
    Replies:
    3
    Views:
    534
    Ron Natalie
    Aug 18, 2003
  4. Jason Heyes
    Replies:
    1
    Views:
    452
    Woebegone
    Nov 19, 2004
  5. Petter Reinholdtsen
    Replies:
    9
    Views:
    4,372
    Howard
    Nov 29, 2004
Loading...

Share This Page