I am using jquery.MultiFile.js for uploading the file with asp:FileUpload control.
<asp:FileUpload ID="fuFileUpload" runat="server" maxlength="1"
ContentEditable="false" />
I am accessing the uploaded file using following java script code
var elem = document.getElementById("<%=fuFileUpload.ClientID%>");
var names = [];
for (var i = 0; i < elem.files.length; ++i) {
names.push(elem.files[i].name);
}
Which will work properly as expected.
Problem: Problem is that when we upload the file then remove the file with (x) button provided in jquery.MultiFile.js. and again upload the file.
elem variable
getting null in this case.
Please Help
What I have tried:
tried to get file in jquery with
// Get posted files
var files = $("#<%=fuFileUpload.ClientID %>").get(0).files;