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

AjaxFileUpload not working - shows uploading % then freeze - no transfer

$
0
0

Here is my code - I simplified everything just to debug - but no chnage

<td valign="top"><asp:label id="lblFile" runat="server" Font-Bold="True">File to Upload:</asp:label></td><td><asp:AjaxFileUpload ID="AjaxFileUpload1" runat="server" OnClientUploadComplete="UploadCompleteClient"
                    OnUploadComplete="ajaxUpload_OnUploadComplete"/><br /><asp:Label ID="lblError" runat="server" Font-Bold="true" ForeColor="Red"
                        Visible="false"></asp:Label><br />

then server side

protected void ajaxUpload_OnUploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
    {
        string filePath = Server.MapPath("~/images/") + e.FileName;

        // YOUR CODE TO SAVE THE FILE NAME IN DATA BASE

        AjaxFileUpload1.SaveAs(filePath);

    }

then script - which does not fire either

        function UploadCompleteClient(sender, args) {
            try {

                alert("Success: UploadCompleteClient");
            }
            catch (e) {
                alert(e.message);
            }
        }






Viewing all articles
Browse latest Browse all 5678

Trending Articles



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