string path = Server.MapPath("./Uploads/"+uploadFile.PostedFile.FileName.Substring(uploadFile.PostedFile.FileName.LastIndexOf('\\')+1));===> path=Server.MapPath()+System.IO.Path.GetFileName(uploadFile.PostedFile.FileName)You can get the path information at webconfig like this: <appSettings> <add key="path" value="d:\\upload\\"/> </appSettings> Get path at .cs: string path=Configurations.appSettings["path"];
path=Server.MapPath()+System.IO.Path.GetFileName(uploadFile.PostedFile.FileName)You can get the path information at webconfig like this:
<appSettings>
<add key="path" value="d:\\upload\\"/>
</appSettings>
Get path at .cs: string path=Configurations.appSettings["path"];