Click here to Skip to main content
15,907,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi There,
I have created a screen which contains a file upload control ,upload button, cancel button.When i upload a file from fileupload control it is in processing.
But now I want to write code for cancel button ,if i click on the cancel button it should cancel processing the file .
I dont know how to do this.
Please can anyone provide an example for this.

Thanks in advance.
Posted
Comments
Ankur\m/ 4-Apr-12 9:59am    
Do NOT post a question again and again. You have already posted this here - http://www.codeproject.com/Questions/360257/how-to-stop-the-current-function-from-executing-in
Use the 'Improve Question' link below your question to make updates to the question.

1 solution

Are you doing an asynchronous file upload? If yes this might help - Sys.WebForms.PageRequestManager.abortPostBack Method[^].

[Edit]I am not sure, but I think the upload will still be successful. The request is already sent. Any update due to the response should be stopped.[/Edit]
 
Share this answer
 
v2
Comments
nira.parmar 5-Apr-12 5:56am    
iam using both file upload control asyncfile upload also, but it is not work for me

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900