更新面板刷新时将文件上载加载为空白 [英] file up-loader blank when update panel refresh

查看:70
本文介绍了更新面板刷新时将文件上载加载为空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文件上传按钮,下面有一个更新面板,

但我的问题是每当更新面板刷新时,我上传的文件上传文件也刷新,文件上传为空白,

i将文件上传到页面的任何位置,但在此之后我面临同样的问题,每次该文件为空,如果更新面板刷新,

so plz help我,

i have a file upload button, and a update panel just below it,
but my problem is whenever update panel is refresh my uploaded file in file upload is also refresh and file uploder is blank,
i put file uploder in any place at the page, but after this i face the same problem, that file blank every time, if update panel is refresh,
so plz help me,

推荐答案

文件上传控件在回发期间不保持状态。据我所知,这是设计的默认行为。为了维护状态(所选文件),你必须像gmail一样做一个解决方法,你可以附加多个文件。谷歌的解决方案,你将有很多解决方案。或者,当您已经在使用更新面板时,为什么不使用asyncfileupload控件?
File Upload Control do not maintain state during postback. That is the default behaviour by design as far as I know. In order to maintain the state(the selected file) you have to make a workaround just like gmail does whaen you attach multiple files. Google the solution and you will have plenty of solutions. Or, when you are already using update panels, why not to make use of the asyncfileupload control?


这篇关于更新面板刷新时将文件上载加载为空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆