Namespace Question - Asp.Net 2.0

M

Matthias

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
 
S

Scott Roberts

Matthias said:
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?
 
M

Matthias

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top