Originally posted by Arild Fines
Have a page that doesn't output any HTML, but merely writes the file back to the Response stream.
Something like this:
Code:
//write to the client
Response.ClearContent();
Response.Buffer = false;
Response.ContentType = "application/octet-stream";
Response.AddHeader( "content-disposition", "attachment; filename=" +
filename );
Response.Write( source.Source );
Response.End();
You could provide the filename or other identifier as a request parameter, eg <a href="download.aspx?id=moo.mdb>Download</a>