I'm developing a website using .NET 3.5 and I'm having problems with the asyncfileupload control.

The problem occurs when you upload a file, and then try upload the same file again. On the second upload, none of the clientside nor serverside methods fire. Everything works fine if you upload one file, upload a file with a different name and then upload the first one again.

This is a bit of a pain because on the page I allow the user to delete the uploaded images so I need the functionality to upload a file with the same name as the previous upload.

Has anyone else encountered this and are there any work arounds?


7 Years
Discussion Span
Last Post by sharana

In case anyone stumbles upon this in the future, I managed to solve this by clearing the value of the input elements that the ASyncFileUpload control creates. E.g.

function clearContents() {
        var AsyncFileUpload = $get("<%=asyncImage.ClientID%>");
        var txts = AsyncFileUpload.getElementsByTagName("input");

        for (var i = 0; i < txts.length; i++) {
            //type == "file" is what is needed to clear the value
            if (txts[i].type == "hidden" || txts[i].type == "file") {
                txts[i].value = "";

The reason why this was so tricky is that in "View Source Chart" (a Firefox plugin that displays the rendered rouce of a page) wasn't showing the value for this input, so I assumed it was empty already!

Edited by peachy0685: n/a


I am facing the same problem that Asyncfileupload won't upload same file twice
if you acheived the solution for this please share the details on that.
Thanks in advance.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.