Asp.net fileupload Excluded after postback without AJAX
I am using asp.net 2.0 without AJAX. The file path in the file upload control will disappear after the postback occurs. I am doing some checking for other controls in the code. I need to upload the file again for further processing. can anyone suggest me how to keep the file path in the file upload control even after postback.
+2
source to share
2 answers
I agree with Silk. The FileInput control cannot store a value in the feedback columns.
A possible workaround for this might be how GMail handles attachment uploads. The file can be placed in some temporary location on the server, and after the message back, display a label indicating that the file is already selected and provide a delete button. The problem is that you should consider cleaning these files.
+2
source to share