0

Here is my html:

<ajax:asyncfileupload runat="server"  onuploadedcomplete="AsyncFileUploaderUploadedComplete" />

Here is the code behind:

protected void AsyncFileUploaderUploadedComplete(object sender, AsyncFileUploadEventArgs e)
    {
       string file = "Upload complete!";
    }

When I put a debug break on the string line and run the program, it never hits the debug line. Any idea why the onUploadedComplete is not working? Thanks for the help

2 Answers2

0

Try to modify the html:

<ajax:asyncfileupload ID="fileupload1" runat="server"  onuploadedcomplete="AsyncFileUploaderUploadedComplete" />
bdn02
  • 1,500
  • 9
  • 15
0

I had the same problem and solved it like this:

   <script type="text/javascript">
            function startUpload() {
                document.forms[0].enctype = 'multipart/form-data';
            } </script>

         <ajaxToolkit:AsyncFileUpload runat="server" ID="asyncUploadMap" 
    OnUploadedComplete="asyncUploadMap_UploadedComplete" 
     OnClientUploadStarted="startUpload" OnClientUploadComplete="finishUpload" 
 UploaderStyle="Modern" />
user1760527
  • 1,144
  • 9
  • 14