This is a migrated thread and some comments may be shown as answers.

how to prevent the event onfileupload when browser back button click

1 Answer 23 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
M Kumar
Top achievements
Rank 1
Iron
Veteran
M Kumar asked on 12 Mar 2019, 07:01 AM

     hi

                I use function OnClientFilesUploaded() in that i call one button click event in the button click i save the file in DB ,after i click the browser back button i check  AsyncUpload1.UploadedFiles.Count=0 in IE,mozila,chrome,opera but in edge AsyncUpload1.UploadedFiles.Count=1 so in this path "E:\MU\AKPKCheckin\App_Data\RadUploadTemp" the file is not there so it through error message "could not find the file...." in that location.

 

1 Answer, 1 is accepted

Sort by
0
Attila Antal
Telerik team
answered on 14 Mar 2019, 04:28 PM
Hi,

Once the file is uploaded, in the same event handler try to reload the page using Response.Redirect and see if that will prevent re-submission of the form.

For example: 

Response.Redirect(Request.RawUrl);

Kind regards,
Attila Antal
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
AsyncUpload
Asked by
M Kumar
Top achievements
Rank 1
Iron
Veteran
Answers by
Attila Antal
Telerik team
Share this question
or