In development, there is often this requirement, and the user is sent to the background after you click on a button. After some background operations, a dialog window that allows the user to download. Let the user choose to save or open.
In fact, this city's HTTTP protocol is scope, as long as the HTTP header sent to the client is sent to the client, it can be.
For ASP.NET & C #
Response.clear () ;::
Response.Appendheader ("Content-Disposition", "Attachment; FileName = filenameshowonclientdialog")
Response.write (ServerPhisicalFileName);
Response.end ();