一页中多个 RadUpload 控件
我有一个使用母版页的 aspx 页面。在 papx 页面中,我加载一个包含 2 个 RadUpload 控件(Rad1 和 Rad2)的用户控件。用户可以选择使用第一个 RadUpload 或第二个 RadUpload 上传文件,并且每个 RadUpload 都会进行一定的验证。
发生的奇怪的事情是,当我使用 Rad2(第二个 RadUpload)上传文件时,第一个 RadUpload 的 RadUpload.UploadedFiles 就在那里(计数 = 1)。该文件不是由 Rad2 上传的,而是被检测为好像是从 Rad1 上传的,因此我的验证失败。
以前有人遇到过这个问题吗?这是一件非常奇怪的事情,我花了将近 1 天半的时间来修复这个问题,但不知道控件发生了什么
I have an aspx page that uses master page. In the papx page, I load a user control containing 2 RadUpload controls (Rad1 and Rad2). User can choose to upload the file either using the first RadUpload or the second RadUpload and there is certain validation applied for each RadUpload.
The weird thing happened is that when I upload file using Rad2 (second RadUpload), the RadUpload.UploadedFiles for the first RadUpload is there (count = 1). Instead of the file being uploaded by Rad2, it is detected as if it is uploaded from Rad1, so my validation failed.
Does someone encounter this problem before? This is a very weird thing and I've spent almost 1 and a half day fixing this without knowing what happened to the control
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请记住,RadAsyncUpload 将尝试使用 FileApi、Adobe Flash Player(v.10 或更高版本)或 Silverlight 作为文件选择对话框,以允许选择多个文件。如果它们都不可用,RadAsyncUpload 将正常降级为单个文件选择。
Please have in mind that RadAsyncUpload will try to use FileApi, Adobe Flash Player (v.10 or newer) or Silverlight for the file selection dialog to allow selecting multiple files. If neither of them is available, RadAsyncUpload will gracefully degrade to single file selection.
我在网页上有三个 radupload/进度控件,它们工作得很好。
我的建议是将它们明确地放置在页面本身中而不是用户控件中。
我并没有尝试复制您的问题,因为我自己正处于开发过程中,但我只是想与您分享一些第一次起作用的东西。
I have three radupload/progress controls on a webpage and they work perfectly.
My suggestion would be to place them explicitly in the page itself instead of within a user control.
I did not try to replicate your issue as I am in the middle of development myself but I just wanted to share something with you that worked the first time.