文件上传+ Ajax [英] File upload + ajax

查看:99
本文介绍了文件上传+ Ajax的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在vs2008中工作.

我的文件上传控件工作正常,直到它不在updatepanel(ajax)内.

在表单中添加updatepanel后,单击按钮会丢失文件上传值.

如果有人对正在发生的事情以及如何解决这个问题有一个想法,请回答.

谢谢

Hi all,

I am working in vs2008.

My fileupload control was working fine until it was not inside updatepanel(ajax).

After adding updatepanel in form, File upload value is lost on button click.

Kindly reply if someone has an idea of actually what is happening and how it can be resolved?

Thanks

推荐答案

>
Sushma_Patel写道:
Sushma_Patel wrote:

我的文件上传控件在正常工作之前一直运行良好不在updatepanel(ajax)内.

My fileupload control was working fine until it was not inside updatepanel(ajax).



如果您不知道,则FileUpload控件在更新"面板中的异步"模式下不起作用.

3个选项:
1.将现有的FileUpload控件放在更新面板之外
2.在按钮上放置回发触发器,以进行文件上载控制.这样,当您使用文件上传控件时,更新面板将不使用部分更新.这是完整的回发.
3.使用新的 Ajax工具包的Asyn FileUpload 控件.



If you are unaware, FileUpload control does not work in Async mode in Update panel.

3 options:
1. Put existing FileUpload control outside Update Panel
2. Put a Postback trigger on the button for file upload control. Such that when you use fileupload control then the update panel does not use partial update. It''s a full postback.
3. Use new Ajax toolkit''s Asyn FileUpload control.


这篇关于文件上传+ Ajax的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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