?
Solved

app_code folder accessing classes, asp.net vb.net

Posted on 2010-09-10
8
Medium Priority
?
707 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Accepted Solution

by:
Mohit Vijay earned 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

801 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