Author: ssj_costy | Posted on: 7/17/2010 7:20:11 AM | Views : 531

Hello,
I was wondering what the best practices for using App_Data would be.
Somebody told me that if I uploaded a file in any other folder that isn't in App_Data, the web-site (or web-application) would notice the change and would get recompiled. Is this true?
When uploading files, I would save some info about them in the database and the actual files I would save in a folder (usually app_data). And when I wanted to access them from the client-side I would make a helper page that would transmit the file content. Is this a good approach? Or can I save the files in a client-accessible folder? (again, I was afraid that the application would get recompiled)
For example, I would let users upload their photos, and stored them in App_Data. When I wanted to display a photo in page, the ImageUrl would look something like this: "~/DownloadPhoto.aspx?PhotoId=3". The DownloadPhoto code would end like this:
Response.TransmitFile(filePath); Go to the complete details ...