Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

AjaxFileUpload "OnClientUploadError" event not firing

$
0
0

Hi,

I have used "AjaxFileUpload" control.

<asp:AjaxFileUpload ID="AjaxFileUpload" MaximumNumberOfFiles="1" ContextKeys="KeyHiddenField" OnUploadComplete="AjaxFileUpload_OnUploadComplete"
        OnClientUploadComplete="OnClientUploadComplete" OnClientUploadError="OnClientUploadErrorTest" runat="server" />

In code behind

protected void AjaxFileUpload_OnUploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
{
// want to fire "OnClientUploadError" javascript event here explicitely.
 throw new NullReferenceException();
}

Javascript :

function OnClientUploadErrorTest(sender, args) {
}

OnClientUploadComplete is firing properly.

For testing i want to fire OnClientUploadError event in JavaScript for that I have explicitly thrown exception in code behind.
But it’s not firing at all.








Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>