Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Namespace Question - Asp.Net 2.0

Reply
Thread Tools

Namespace Question - Asp.Net 2.0

 
 
Matthias
Guest
Posts: n/a
 
      02-22-2008
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
 
Reply With Quote
 
 
 
 
Scott Roberts
Guest
Posts: n/a
 
      02-22-2008

"Matthias" <matthias_KILLSPAM_@photocase.com> 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?

 
Reply With Quote
 
 
 
 
Matthias
Guest
Posts: n/a
 
      02-22-2008
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" <matthias_KILLSPAM_@photocase.com> 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?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR CS0234: The type or namespace name 'DataAccessHelper' does not exist in the namespace 'BCC' (are you missing an assembly reference?) li.eddie@gmail.com ASP .Net 0 01-06-2006 11:31 AM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
Reaching into the default namespace when using another namespace. Jason Heyes C++ 1 11-19-2004 02:36 AM
Namespace: Is it a scope or a namespace? Anonymous C++ 3 08-18-2003 01:31 PM
Help:Why can't I use namespace System.Web? It is said that this namespace doesn't exist. But it should exist. Èý¹â ASP .Net 1 07-29-2003 04:31 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57