asp.upload控制器在更新面板中始终返回false [英] asp.upload controller returns always false in update panel

查看:85
本文介绍了asp.upload控制器在更新面板中始终返回false的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用3.5框架vs2010

ASP:上传控制正常工作
当我使用Ajax scriptmanager将其放置在更新面板中时,它开始在
中产生问题 "
使用更新面板时出现问题
if(up.hasfile)
{}
"
尽管我选择文件
它总是返回false 当我删除更新面板时,它可以正常运行
问题是什么?

I am using 3.5 framework woth vs2010

Asp:upload Control working Fine
When i place it in update panel with ajax scriptmanager It starts making Problem in
"
Problem using Update Panel
if(up.hasfile)
{}
"
it always returns false although i select file
when i remove update panel it works ok
what is the issue??

推荐答案

默认情况下,FileUpload控件在UpdatePanel控件内无法使用异步回发上传文件.这是因为出于安全原因,默认情况下在客户端限制文件上传和文件操作.因此,不可能在UpdatePanel中使用异步回发上传文件.
报价源. /a>
By default, FileUpload control will not work inside an UpdatePanel control for uploading files using Asynchronous postback. This is because, the file uploading and file manipulations is restricted by default in client side for security reasons. Hence it is not possible to upload files using asynchronous postback in UpdatePanel.
Quote source.


这篇关于asp.upload控制器在更新面板中始终返回false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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