Good Day I'm having a problem when i'm try to create a code that gets the excel file from this path on the web server "D:/files/myexcel.xls" to clients computer or download from it. here's my code.
dim FileName as string ="myexcel.xls"
dim MyPath as string = "D:/files/" & filemane
Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("content-Disposition", "attachment-filename=" & Server.MapPath(FileName)) Response.TransmitFile(Server.MapPath(FilePath)) Response.End()
but this cause an error: is a physical path, but a virtual path was expected

Go to the complete details ...