(4 ratings)   
By: asptutorials.net
f you are new to ASP.NET then you may have been a bit puzzled to see certain folders (directories) in your project that you didn't create, such as App_Code or App_Data.
Added: 25 June 2008    Views: 665  
PathComputers    Programming    Asp
Keywords: computers   programming   language   asp   database   functions   code   coder   folders  
Do you like this tutorial? Now you can support our team to add more :     
 
 
 

If you are new to ASP.NET then you may have been a bit puzzled to see certain folders (directories) in your project that you didn't create, such as App_Code or App_Data. These are "reserved" folders that are given special usage by Microsoft. By convention, each is used for a set purpose, although these purposes are not rigidly enforced. This page is about these folders and what you can expect to find in them.

By the way, you may not have all of these folders in your project because you have no need for them. If you want to add one of them go to Solution Explorer, right-click on your project's name at the top of the list, select "Add ASP.NET folder" and pick the one you want to add.

The folders described:

App_Browsers stores special configuration files for individual browsers' settings. If you are writing code to target a non-standard browser, you could configure the capabilities of that browser here. I think that not many people will ever touch this folder.

App_Code stores .cs and .vb files that contain classes that are needed by your main website code. Any file you put in here is automatically referenced in your main application, which is useful. I normally put libraries of useful functions here, with the functions wrapped up in a static class. The compiler automatically picks them up and is able to use them without you needing to do anything else.

App_Data stores datafiles that are used by the website. Normally this means database files, including Access databases. One common use for App_Data is to store the ASPNETDB.MDF file (containing usernames and passwords) used by the ASP.NET default system of authenticated website access.

App_GlobalResources stores .resx and .resources files, which are files for translations of your webpages into different languages. These files apply to the entire project, hence the "global" in the name.

App_LocalResources is a "reserved" folder-name that acts just like App_GlobalResources, except that it is not global but local. This means that you can have multiple App_LocalResources folders, scattered throughout the directory structure of your application. Each App_LocalResources acts like a local version of App_GlobalResources that only applies to the folder containing it.

App_Themes stores files used to change the appearance of the website such as .css files, .skin files, and the image files that are used by the themes.

App_WebReferences is some sort of way of creating a reference to components or classes that are located on the web somewhere other than in your application, but I have never used this.

Bin stores .dll library files that you want to make available to your entire application. Simply by putting a .dll file here (usually a compiled version of a user control) it becomes available to your entire application.

About the Author :
asptutorials.net
ASP.NET 2 Special Purpose Folders
Articles and Tutorials Directory by www.learnfobia.com
 Rate this tutorial : Rate 1Rate 2Rate 3Rate 4Rate 5
  |    Add to Favorites
  |    Send to Friend
  |    Print
Comments