Hi, I am working on a project where i need to store data in App_Data, any one can help me to tell how can i do it.

Recommended Answers

All 2 Replies

The folder is more for database files (SQL, Access, XML, etc.). If you are trying to put a database file in the folder, just create a new one there or detach a database from your server, move it to that location, then reattach it. All easily done with Enterprise Manager. or if you use SQL Express then you can attach it through a connection string.

Then to access it, and considering that you have added the connection string to your web.config file, all you need to do is put this in the connectionstring section of your sqldatasource control:

<%$ ConnectionStrings:ConnectionStringName %>

App_Data is used to save SQL database files (.mdf files), Access database files (.mdb files), XML files, and so on.To add a new file right click on App_Data folder and add the corresponding file name

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.