文件从文件上传控制中丢失 [英] File getting lost from fileupload control
本文介绍了文件从文件上传控制中丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我有一个使用文件上传控件的asp.net表单.我选择要上传的文件,但是每次单击任何导致回发的复选框,按钮时,所选文件都会从文件上传控件中丢失/删除.每次选中复选框或回发后,我都必须从fileuploader中重新选择文件.请帮助我摆脱这个问题.
谢谢,
问候,
gauri
解决方案
看看 ^ ]
希望对您有所帮助:)
发生回发时,我认为它会将现有文件路径作为预加载并删除.出于安全原因,您无法预加载a的名称文件放入FileUpload控件.
以下链接将提供解决方案.
维护回发中的文件上传控制
>
Hello,
I have a asp.net form on which i am using fileupload control. I choose a file to be uploaded but each time if i click on any check box,button which causes postback, the chosen file gets lost/removed from the fileupload control.Every time after checking check box or postback i have to reselect file from fileuploader. Please help me to get rid of this problem.
thankyou,
regards,
gauri
解决方案
Have a look at This[^]
hope it helps :)
When there is a postback I think it takes the existing file path as a preload and takes it off.For security reasons, you cannot pre-load the name of a file into the FileUpload control.
Following link will provide the solution.
Maintain File Upload Control on Postbacks
这篇关于文件从文件上传控制中丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文