在自动回传上载文件 [英] Upload file on Autopostback
本文介绍了在自动回传上载文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我想知道是否有人可以帮助我.我有一个Web表单,可以在其中将数据输入给定文件,其中一些文件会自动回发.我还有两个上传功能,可以在其中将文件上传到表单上.
但是,每次我上载文件并执行自动回发操作时,似乎都会完全删除该文件.
有没有一种方法可以使自动回发不删除上传的文件?
这是我的上传代码:
Hi there,
I wonder if anyone could help me. I have a web form where i can enter data into given fileds some of them are on autopost back. I also have two upload functions where i can be able to upload files onto the form.
But everytime i upload the files and do something autopostback seems to be removing the file completely.
Is there a way so that autopostback does not remove the uploaded file?
Here is my upload code:
<pre lang="css"><asp:FileUpload ID="FileUpload1" runat="server" Style="z-index: 117; left: 458px;<br />
position: absolute; top: 31px" /></pre><br />
在此先感谢
Thanks in advance
推荐答案
请执行以下操作:
1.在.aspx页中添加UpdatePanel
2.将除FileUpload控件之外的所有控件放置在UpdatePanel中
谢谢,
Imdadhusen
Hi,
Please do the following:
1. Add UpdatePanel in .aspx page
2. Place all the controls inside the UpdatePanel except FileUpload control
Thanks,
Imdadhusen
这篇关于在自动回传上载文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文