Ajax 工具包 AsyncFileUpload 无法在普通面板内工作

发布于 2024-09-16 00:41:45 字数 216 浏览 1 评论 0原文

参考以下内容: 一旦我将其放入控件中,Ajax Asyncfileupload 就无法工作

同样的问题。不过我没有使用母版页。我在更新面板的面板中有一个 AsyncFileUpload 控件。

关于可能导致该问题的原因有什么想法吗?

Referring to the following:
Ajax Asyncfileupload doesn't work as soon as I put it in a control

I am having the same issue. I am not using a Master page though. I have an AsyncFileUpload control in a Panel, within an update panel.

Any ideas as to what could be causing the issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

柠檬色的秋千 2024-09-23 00:41:45

当您使用 AsyncFileUpload 时,您必须在放置在页面或 MasterPage 中的 form 标记中设置正确的参数:

 <form id="form1" runat="server" enctype="multipart/form-data" method="post">

如果您没有设置正确的 enctype 和方法 < strong>UploadedComplete 永远不会触发,并且您将无法获取 FileUpload.FileBytes,因为 FileUpload.HasFile 仅在 UploadedComplete 执行期间返回 true。

我认为您的页面中没有设置正确的 enctype。

此外,之前版本的 AsyncFileUpload 无法在 Chrome 上运行。 2011年7月版本(4.1.50731.0)解决了该问题。

When you use AsyncFileUpload you must set the right params in the form tag, that is placed in your Page or MasterPage:

 <form id="form1" runat="server" enctype="multipart/form-data" method="post">

If you don't set the right enctype and method UploadedComplete will never fire, and you won't be able to get FileUpload.FileBytes since FileUpload.HasFile returns true only during UploadedComplete execution.

I suppose that in your page you haven't set the right enctype.

Besides, prevoius versions of AsyncFileUpload didn't work on Chrome. 2011 July version (4.1.50731.0) solved the problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文