• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 755
  • Last Modified:

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

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
  • 3
  • 2
3 Solutions
Ajay SharmaCommented:
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.
Ajay SharmaCommented:
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.
prdeshpandeAuthor Commented:
Can I use
•      App_GlobalResources
•      App_LocalResources
to solve this problem.
Ajay SharmaCommented:
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
 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.
prdeshpandeAuthor Commented:
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.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now