Note that there are some explanatory texts on larger screens.

plurals
  1. POAsyncFileUploadWithAjaxToolKit not worked
    text
    copied!<p>Hi to all I'd using the following code for upload :</p> <pre><code>HTML: &lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;&lt;/asp:ScriptManager&gt; &lt;cc1:AsyncFileUpload ID="AsyncFileUpload1" Width="400px" runat="server" OnClientUploadError="uploadError" OnClientUploadStarted="StartUpload" OnClientUploadComplete="UploadComplete" CompleteBackColor="Lime" UploaderStyle="Modern" ErrorBackColor="Red" ThrobberID="Throbber" OnUploadedComplete="AsyncFileUpload1_UploadedComplete" UploadingBackColor="#66CCFF" /&gt; &lt;asp:Label ID="Throbber" runat="server" Style="display: none"&gt; &lt;img src="Images/indicator.gif" align="absmiddle" alt="loading" /&gt; &lt;/asp:Label&gt; &lt;br /&gt; &lt;br /&gt; &lt;asp:Label ID="lblStatus" runat="server" Style="font-family: Arial; font-size: small;"&gt;&lt;/asp:Label&gt; </code></pre> <p>And my java script code is:</p> <pre><code> function uploadError(sender, args) { document.getElementById('lblStatus').innerText = args.get_fileName(), "&lt;span style='color:red;'&gt;" + args.get_errorMessage() + "&lt;/span&gt;"; } function StartUpload(sender, args) { document.getElementById('lblStatus').innerText = 'Uploading Started.'; } function UploadComplete(sender, args) { var filename = args.get_fileName(); var contentType = args.get_contentType(); var text = "Size of " + filename + " is " + args.get_length() + " bytes"; if (contentType.length &gt; 0) { text += " and content type is '" + contentType + "'."; } document.getElementById('lblStatus').innerText = text; } </code></pre> <p>And my server Slide scripting :</p> <pre><code>protected void AsyncFileUpload1_UploadedComplete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e) { System.Threading.Thread.Sleep(5000); if (AsyncFileUpload1.HasFile) { string strPath = MapPath("~/Uploads/") + Path.GetFileName(e.FileName); AsyncFileUpload1.SaveAs(strPath); } } </code></pre> <p>and I've the folowing error:</p> <blockquote> <blockquote> <p>Failed to load resource: the server responded with a status of 404 (Not Found) Scripts/WebForms/MsAjax/MicrosoftAjaxWebForms.js Failed to load resource: the server responded with a status of 404 (Not Found) Scripts/WebForms/MsAjax/MicrosoftAjax.js Uncaught Error: ASP.NET Ajax client-side framework failed to load. test.aspx:72 Uncaught ReferenceError: Sys is not defined test.aspx:84 Uncaught ReferenceError: Sys is not defined test.aspx:105 Uncaught ReferenceError: Sys is not defined </p> </blockquote> </blockquote> <p>It my first time to using this conrotl plz help me thanks a lot.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload