Reputation: 27643
Is there a way to confirm that a user has downloaded a file? (As opposed to having refused the download, or cancelling it in the middle?) Preferably in c# codebehind.
When using: Response.Write(...);
.
Upvotes: 3
Views: 271
Reputation: 7462
You can use Response.IsClientConnected
to check if still client is connected.
From MSDN
This property enables you greater control over circumstances where the client may have reset the connection to the server. For example, if a long period of time has elapsed between when a client request was made and when the server responded, it may be beneficial to make sure the client is still connected before continuing to process the script.
After write to response using Response.Write
, execute this to check if client is connected, if that is true means file is written to response/ downloaded.
http://msdn.microsoft.com/en-us/library/ms525453(v=vs.90).aspx
Upvotes: 1