Solved

app_code folder accessing classes, asp.net vb.net

Posted on 2010-09-10
8
702 Views
Last Modified: 2012-05-10
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
0
Comment
Question by:TrialUser
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 9

Expert Comment

by:richard_hughes
ID: 33647302
Hello TrialUser

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

Thanks,

Richard Hughes
0
 

Author Comment

by:TrialUser
ID: 33647345
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
 
LVL 8

Expert Comment

by:Mohit Vijay
ID: 33647502
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
Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

 
LVL 8

Accepted Solution

by:
Mohit Vijay earned 500 total points
ID: 33647527
Remember: App_Code is for Web site only on Project...
Are you using Project or WebSite (what you create it as in start?)
0
 

Author Comment

by:TrialUser
ID: 33647644
I created it as Project not website. Can i not use app_code? please help thanks.
0
 
LVL 9

Expert Comment

by:richard_hughes
ID: 33647671
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
 
LVL 8

Expert Comment

by:Mohit Vijay
ID: 33647679
no it will work website only
0
 
LVL 8

Expert Comment

by:Mohit Vijay
ID: 33647706
0

Featured Post

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question