C# Tutorials and offshore development in India
Tutorials Resources Forum Reviews Communities Interview Jobs Projects Training Videos


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...


Birthday Greetings
Learn Windows 7: Changing default language for Windows 7 login screen   You can change the default language for windows 7 login screen using the Region and Language option in control panel. This article discusses how to change the default language for windows 7 login screen.



Resources » Articles » ASP.NET/Web Applications »

App_Data


Posted Date: 12 Mar 2009    Resource Type: Articles    Category: ASP.NET/Web Applications
Author: SanjivaniMember Level: Gold    
Rating: 1 out of 5Points: 10



Hello Friends,
One of dotnetspider member raised a question on app_data in the forum, and that inspired me to write about this folder. I will explain why this folder resides in the web application. Its use and advantages.

Why App_Data folder:
App_Data folder reside in web application’s root folder. It is a reserved folder and it is there so that we can save our web site specific data related files such as database files (e.g. MS SQL Server, MS Access). You can have nested folders inside App_Data to organize your database files. One web site project can have only one App_Data folder.

To add database to App_Data, right click on the folder and select required data file. It provides you list of all possible data files.

To add existing database files, simply copy paste the files in App_Data and refresh the folder or go through Add existing files after right clicking the folder. Be aware of adding MS SQL server database files. You need to detach the database files first and then copy to the folder and reattach them.

Advantage of having App_Data folder:
1. It can be used for maintaining Membership(http://msdn.microsoft.com/en-us/library/yh26yfzy.aspx) and Roles managements(http://msdn.microsoft.com/en-us/library/5k850zwb.aspx)
2. If your web project is complicated enough like having *.cs and *.vb files, this folder will not get affected by that since it just saves your database files and to access database in all code behind files you can just use connection string of web.config file.
3. You can manage your database easily using server explorer



Thanks and Regards
Sanjivani





Responses to the resource: "App_Data"
Author: PHANI HARSHITHA MADALA    14 Mar 2009Member Level: Diamond   Points : 1
hi,

good article about app_code.

the links are usefull in getting more info



Author: Sanjivani    15 Mar 2009Member Level: Gold   Points : 1
Thank you greeny_1984 :)


~Sanjivani
Pl rate the post if you like it...




Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
App_Data  .  Reserved folder in web sites  .  Website storage area  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: How to add click event for dynamically generated button
Previous Resource: How to create Master Pages for Consistent website
Return to Resources
Post New Resource
Category: ASP.NET/Web Applications


Post resources and earn money!
 
More Resources



About Us    Contact Us    Privacy Policy    Terms Of Use