0

I'm working on an application and I have a AjaxFileUpload control. I set OnClientUploadComplete to a javascript function and OnUploadComplete to a method in my code behind(.cs).

In which order do these run? Or do they run in parallel?

In my OnUploadComplete i'm moving images from a tmp folder to a CDN. An in my OnClientUploadComplete i'm retrieving a new list of images, however, it doesn't seem to get the updated list unless i refresh the entire page. That is why i'm assuming these methods run in parallel.

Is there a way to get the OnClientUploadComplete to run AFTER the OnUploadComplete is done?

AspUser7724
  • 109
  • 2
  • 10

1 Answers1

0

You can use setTimeout() method in OnClientUploadComplete. So the method will be execute after completion of time provided in setTimeout() meanwhile OnUploadComplete will execute.

Techno Crave
  • 423
  • 1
  • 7
  • 17