且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

FileUpload控件一个UpdatePanel内没有刷新整个页面?

更新时间:2023-11-30 15:30:52

我知道一个第三方组件,可以做到这一点的。这就是所谓的 SWFUpload的,并可以免费使用和开源的,并且使用JavaScript和Flash这样做的魔力。

I know of a third party component that can do that. It's called "swfupload" and is free to use and open source, and uses javascript and flash to do the magic.

下面是他们所提供的功能列表: (从他们的网站)

here is a list of the features they offer: (from their site)

      
  • 按ctrl /移选择对话框上传多个文件一次
  •   
  • 在所有事件的Javascript回调
  •   
  • 在获取文件信息上传开始前
  •   
  • 在风格上传元素XHTML和CSS
  •   
  • 显示信息,而文件是使用HTML上传
  •   
  • 在没有页面重新加载必要
  •   
  • 工作在所有平台/浏览器具有闪存的支持。
  •   
  • 优雅地降低到正常的HTML上传表单如果Flash或JavaScript   不可用
  •   
  • 在上传开始前控制文件大小
  •   
  • 只显示选择文件类型对话框
  •   
  • 在队列上传,删除/上传开始前,添加文件
  •   
  • Upload multiple files at once by ctrl/shift-selecting in dialog
  • Javascript callbacks on all events
  • Get file information before upload starts
  • Style upload elements with XHTML and css
  • Display information while files are uploading using HTML
  • No page reloads necessary
  • Works on all platforms/browsers that has Flash support.
  • Degrades gracefully to normal HTML upload form if Flash or javascript is unavailable
  • Control filesize before upload starts
  • Only display chosen filetypes in dialog
  • Queue uploads, remove/add files before starting upload

他们也有一个试玩区在那里你可以玩弄自己的控制权。这样,你可以确保它正是你想要的。

They also have a demo area where you can play around with their control. That way you can make sure it is exactly what you want.

我们用它在我们的项目之一,它从来没有我们这么远,所以我认为这是一个安全的赌注。

We used it in one of our projects and it has never failed us so far, so I think this is a safe bet.

哦,这里是下载页面: HTTP://$c$c.google .COM / P / SWFUpload的/

oh and here is the download page: http://code.google.com/p/swfupload/