Using asp.nets upload control how do I set the code behind to save into the asp projects folder. I made a folder for userdata and a table in mysql which the link needs to be saved. Atm tho I just want to upload the data to the project folder of my choosing how is this done?
Also what are my options for the upload? I dont want to use ftp id rather use http for the upload?
path: ~/userdata/2/uploadedimage/batman-for-facebook.jpg
Any thing in the way of examples how to upload to the project folder via http would be great.
Thanks Guys
If by the project folder you mean the root of your web application, you can use
Server.MapPath("~/"), which will give you the physical filesystem location of the directory where your app is running. You can then append the filename you want to use to that, and write it out.Note that you’ll have to make sure that the account under which your app is running has enough permissions to write to that directory.