App_code folder in ASP.NET 2.0

What is the purpose of App_code folder in ASP.NET 2.0?

Questions by sbehera02   answers by sbehera02

Showing Answers 1 - 15 of 15 Answers

App_Code directory is very useful in that it can be used to store all the reusable classes that you want to use from your ASP.NET pages. To utilize the App_Code directory, all you need to do is to create those reusable classes and place them under the App_Code directory. Whenever a change occurs in the App_Code directory, ASP.NET will dynamically recompile these classes and automatically make it available to all the pages in the web site. Note that you should put only classes into the App_Code subdirectory. You should not put pages, web user controls, or other non-code files containing non-code elements into this subdirectory.

  Was this answer useful?  Yes

sivanesanb

  • Feb 25th, 2009
 

App_Code directory contains reusable classes, while compiling the project all the classes create one dll at runtime that is accessed by websites if necessary. If we are not putting the class files in to App_Code directory compiler does not create a dll file also websites cant able to access program logics files from the dll.

  Was this answer useful?  Yes

vipul14u

  • May 26th, 2009
 

The App_Code folder is meant to store your classes, .wsdl files, and typed datasets. Any of these items stored in this folder are then automatically available to all the pages within your solution. The good thing about the App_Code folder is that when you place something inside this folder, VS 2005 automatically detects this and compiles it if it is a class, automatically creates your XML Web Service proxy classes, or automatically creates a typed dataset for you from your .xsd files. After the files are automatically compiled, these items are then instantaneously available to any of your ASP.NET pages that are in the same solution.

  Was this answer useful?  Yes

Anto

  • Aug 22nd, 2011
 

I've class files from outside the app_code directory .. you have given the answer without store class files inside the app_code directory cant create dll while runtime..i can access my class file from our site or not also while runtime dll will create for my class file or will not create

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions