app_code folder accessing classes, asp.net vb.net

i have some web page in the root directory of the solution. i have some classes inside the app_code folder.

I am unable to access these classes that are inside the app_code from the webpages in the root dirctory. should I add a namespace or how can I make these accessible. I am working in asp.net 4.0, vb.net. please help thanks
TrialUserAsked:
Who is Participating?
 
Mohit VijayCommented:
Remember: App_Code is for Web site only on Project...
Are you using Project or WebSite (what you create it as in start?)
0
 
richard_hughesCommented:
Hello TrialUser

Are your classes marked as public? Adding a namespace to them can also be of help.

Thanks,

Richard Hughes
0
 
TrialUserAuthor Commented:
yes the classes are marked public. i tried adding a namespace to the class as

namespace test1
put my class here
end namespace

then in my webform did
import test1

however i still cant access these clases. any suggestions or ideas would b great

0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
Mohit VijayCommented:
Is your all classes/pages in same name space.

Example
if you hve your .cs pages (outside of app_code) have NameSpace MySpace1

then your app_code folder should hve parent namespace MySpace1
and underit, you can define its own namespace.

Yes All classes should be public.
0
 
TrialUserAuthor Commented:
I created it as Project not website. Can i not use app_code? please help thanks.
0
 
richard_hughesCommented:
OK

You need to create a new ASP .NET website.

Have a look here as to how:

File -> New -> Website

Then select an appropriate type like in the image attached.

Thanks,

Richard Hughes
Capture.PNG
0
 
Mohit VijayCommented:
no it will work website only
0
 
Mohit VijayCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.