I’m using this method to download a file from somewhere on my aspx page called: downloader.aspx
byte[] virtualPath = client.DownloadData(link/file.doc);
Response.BinaryWrite(virtualPath);
However, when the client shows the download it tells me:
“Do you want to download downloader.doc from mywebsite.com?
It does not show the original name.
Is there a way to use the original name (file.doc) instead of the name of the aspx page?
Use the response header
Content-Dispositionto set the filename.