Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

Asp file upload control not working when i get response from handler. first time its working fine, when i clicked on file upload , i can able to select file but after that nothing happening.
please help to rectify the issue.

C#
<asp:FileUpload runat="server" id="fleupload" />



C#
$('#btn').click(function () {
       
             
                $.ajaxFileUpload({
                    type: 'POST',
                    contentType: "application/json; charset=utf-8",
                    url: 'Handlers/UploadFile.ashx',
                    
                    secureuri: false,
                    dataType: 'text',
                    contentType: "text/html",
                    data: { $('#aid').val() },
                    success: function (data, status) {
                  
                        if (data.length > 0) {
                           
                            alert(data);
                        }
                        else {
                           
                        }
                    },
                    error: function (data, status, e) {
                   
                        if (err.statusText.length > 0) {
                            
                            alert(err.statusText);
                        }
                    }
                });
            }
        }
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900