hi
i am using fileupload tag to upload the file. what is does it saves the file into the follwoing directory: C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\
can somebody tells me how to change this path and save the upload file into some other directory.
Loading
Javeed M ShaikhPosted Oct 28, 2011, 10:00 AM
FileUploadControl.SaveAs(Server.MapPath("~/Uploads")+f_Name);
with
FileUploadControl.SaveAs(Server.MapPath("~/Uploads/")+f_Name);
We are assuming that you have a Uploads directory in your web root folder, otherwise change the path to your desired folder.
Sam HobbsPosted Oct 28, 2011, 5:13 PM
Javeed M ShaikhPosted Oct 28, 2011, 4:26 PM
Sam HobbsPosted Oct 28, 2011, 4:18 PM
Suthish NairPosted Oct 28, 2011, 3:28 PM
Sam HobbsPosted Oct 28, 2011, 1:47 PM
saifullah khanPosted Oct 28, 2011, 8:34 AM
TulasiPosted Oct 28, 2011, 7:37 AM
chk this code
string f_Name=Path.GetFileName(FileUploadControl.FileName);
FileUploadControl.SaveAs(Server.MapPath("~/Uploads")+f_Name);