how to know the user download information?
-
Hello, I am using the following code to provide download funcition, when user click the download button, then a download dialog will automatically appear which with three buttons: open, save and cancel. OK, the user can select one of three. Now, I want to know how can I know which button is clicked by the user, espeically whether the user click the cancel button or not, in order to know whether the user has really downloaded the file. if the following code is not easy to do so, then any alternative solutions? Thanks! Response.ContentType = "pdf/doc/exe/chm"; Response.AppendHeader("Content-Disposition", "attachment; filename=" + str_download_file_name_full); Response.TransmitFile(Server.MapPath("~/files/" + str_download_file_name_full)); Response.End();
-
Hello, I am using the following code to provide download funcition, when user click the download button, then a download dialog will automatically appear which with three buttons: open, save and cancel. OK, the user can select one of three. Now, I want to know how can I know which button is clicked by the user, espeically whether the user click the cancel button or not, in order to know whether the user has really downloaded the file. if the following code is not easy to do so, then any alternative solutions? Thanks! Response.ContentType = "pdf/doc/exe/chm"; Response.AppendHeader("Content-Disposition", "attachment; filename=" + str_download_file_name_full); Response.TransmitFile(Server.MapPath("~/files/" + str_download_file_name_full)); Response.End();
Seraph_summer wrote:
espeically whether the user click the cancel button or not, in order to know whether the user has really downloaded the file.
AFAIK : It is not possible. :(
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.
-
Hello, I am using the following code to provide download funcition, when user click the download button, then a download dialog will automatically appear which with three buttons: open, save and cancel. OK, the user can select one of three. Now, I want to know how can I know which button is clicked by the user, espeically whether the user click the cancel button or not, in order to know whether the user has really downloaded the file. if the following code is not easy to do so, then any alternative solutions? Thanks! Response.ContentType = "pdf/doc/exe/chm"; Response.AppendHeader("Content-Disposition", "attachment; filename=" + str_download_file_name_full); Response.TransmitFile(Server.MapPath("~/files/" + str_download_file_name_full)); Response.End();
well, AFAIK there is no way to determine whether the file is actually downloaded in this way. The file is downloaded once you postback totally. :doh: :doh: If there is any other way around, of this.. .please let me know. :thumbsup:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.