Confirm the file has been uploaded

Is there a way to confirm that the user has uploaded the file? (As opposed to failing to download or canceling it in the middle?) Preferably in C # codebehind.

Use: Response.Write(...);

.

+3


source to share


1 answer


You can use Response.IsClientConnected

to check if the client is still connected.

From MSDN

This property allows you to more effectively control the circumstances under which a client can reset the connection to the server. For example, if a long period of time elapsed when the client's request was made and when the server responded, it might be helpful to make sure the client is still connected before proceeding with the script.



After writing in response with, Response.Write

execute this to check if the client is connected, if so, then the file is being written to response / loaded.

http://msdn.microsoft.com/en-us/library/ms525453(v=vs.90).aspx

+1


source







All Articles