views:

1997

answers:

4

I'm looking to allow a user to browse and upload a file to the server in my ASP.NET MVC application.

If it is possible, I'm interested in adding a progress bar to show how much of the file has been uploaded.

Does anyone have any examples of something like this? Should I use jQuery to do this?

+3  A: 

Steve Sanderson put some examples on his blog awhile back that I found helpful. He has the source code available as well.

Lance Harper
+5  A: 

The beauty of ASP.NET MVC is that you can choose almost any out of the box upload component out there and use it without any problems.

This plugin for jQuery is a great choice and one that I use in my projects: Uploadify

Praveen Angyan
How were you able to get Uploadify to work without a Flash dependency?
Robert Harvey
Took a look at it - really hate the flash usage.
UpTheCreek
+3  A: 

My SlickUpload ASP.NET upload control supports ASP.NET MVC and doesn't introduce a dependency on flash.

Chris Hynes
It does, however, produce a dependency on cash.
CitizenBane
If you're doing a personal non-commercial project, licenses are free: http://krystalware.com/Company/DiscountLicense.aspx. If you're doing something commercial but don't have the funding for a license, contact me and I'm sure we can work something out.
Chris Hynes
A: 

Uploadify is nice, but we can't use Flash, so we are using Darren Johnstone's file upload control:

ASP.Net File Upload/Download Module Version 2
http://darrenjohnstone.net/2008/07/15/aspnet-file-upload-module-version-2-beta-1/

It includes a progress bar dialog driven entirely with Javascript, and even has the capability to upload and download files directly to a SQL Server database.

Robert Harvey
Are you using this upload control in an MVC application? If so, would you mind posting a code snippet on how to get it working?
Gunny
We haven't implemented it yet, sorry.
Robert Harvey