简体   繁体   中英

ASP.Net Ajax AsyncFileUpload events not firing after postback - ASP.NET, C#

I have ASP.Net Ajax AsyncFileUpload in one of my pages. All the events including OnUploadedComplete, are firing fine after page load and after page is posted back using a button or something those events are not firing.


<form id="form1" runat="server" enctype="multipart/form-data">


<ajaxToolkit:AsyncFileUpload runat="server" ID="FileUpload" ClientIDMode="Static" OnClientUploadStarted="onClientUploadStarted" OnClientUploadComplete="onClientUploadCompleted" OnClientUploadError="onClientUploadError"
                            Width="100%" UploaderStyle="Traditional" OnUploadedComplete="ProcessUpload" UploadingBackColor="#FFFFFF"
                            ErrorBackColor="White" CompleteBackColor="White" CssClass="upload" Style="display: none" />

and I have used a master page in my project.This is weird and any help would be greatly appreciated.


In the browser console there is an error saying,

Uncaught ReferenceError: partialLoad is not defined

Finally, I found the reason why it didn't work. I have called none existing javascript function (Using ScriptManager) in the button click event and that's why console showed that Uncaught ReferenceError: partialLoad is not defined error. Once I removed that function call, AsyncFileUpload events worked Fine.

Thanks for the quick response and

cheers (Y)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM