Solved

Not getting app_code folder in Project(web application) in Visual studio 2005?

Posted on 2010-09-14
5
704 Views
Last Modified: 2013-11-26
Hi, I am creating Project(web application) in VS2005 and I am not getting App_Code folder

Following folders  are listed when click on “ADD ASP.NET FOLDER”:
•      App_GlobalResources
•      App_LocalResources
•      App_Data
•      App_Browsers
•      Themes

And if manually create a folder using “New Folder” option and then rename it to App_Code and then add class file into this folder but web forms(default.aspx.cs) are not able to access code of this class.

While in web site it is possible to access.

What’s I missed.
Kindly help
0
Comment
Question by:prdeshpande
  • 3
  • 2
5 Comments
 
LVL 18

Assisted Solution

by:Ajay Sharma
Ajay Sharma earned 500 total points
ID: 33671621
App_Code folder is not available in the WEB APPLICATION type of projects.
If you create a FILE >> NEW WEB SITE then only it will be available in the solution explorer.
0
 
LVL 18

Assisted Solution

by:Ajay Sharma
Ajay Sharma earned 500 total points
ID: 33671661
You will not abe able to refer to that class, as it don't have namespace declaration into it.
Alternatively you can add a new class in the solution and then copy paste the functions of old cs file into the new one. Do not copy paste all code, just paste code after NAMESPACE declaration block in new file.
0
 
LVL 1

Author Comment

by:prdeshpande
ID: 33680264
Can I use
•      App_GlobalResources
•      App_LocalResources
to solve this problem.
0
 
LVL 18

Accepted Solution

by:
Ajay Sharma earned 500 total points
ID: 33680309
These are special folders of asp.net and they can't serve the different functionality.
In any case you can't use the same cs file from App_Code into the Web Application.
Either you need to add a namespace declaration to it
or
 create a new cs file (any where in the solution) and copy old mentods to this new cs file.
The second case is more effective and successful.
0
 
LVL 1

Author Comment

by:prdeshpande
ID: 33689143
Thanks.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now