hi, i have written some code that lets the user to upload a file to the root directory of the website. I want the file to be renamed automatically before it is being saved, how do i do this??
using System.IO
string ImagesFolder = “MyImageFolder”;
string savePath;
string saveFile;
savePath = Path.Combine(Request.PhysicalApplicationPath, ImagesFolder);
saveFile = Path.Combine(savePath, FileUpload1.FileName);
FileUpload1.SaveAs(saveFile);