Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
how to clear asp:FileUpload text in Server Side(Code Behind)?
not in Client side(Inline Code/Markup)

thanks in advanced
Posted
Updated 8-Feb-12 20:58pm
v3
Comments
Sergey Alexandrovich Kryukov 9-Feb-12 1:51am    
Not clear.
--SA
zyck 9-Feb-12 3:10am    
if my question is not clear why Abhinav S has a solution

1 solution

To clear the contents of the file upload control using Javascript, go through Clear upload file input field [^].

Otherwise, you can try a method like
C#
function clearFileUpload() {
    var up = document.getElementById("fileUploadControl");
    up.setAttribute("type", "input");
    up.setAttribute("type", "file");
    }
}
 
Share this answer
 
v2
Comments
zyck 9-Feb-12 3:13am    
thanks
Espen Harlinn 11-Feb-12 5:17am    
5'ed!

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