I am developing a website that uses the following technologies: ASP.NET, C#, MS SQL 2012, Entity Framework 5
The core part of the site is a multi-step form. It is a very long form and some of the steps required the user to attach a file. I have successfully written code to collect the attachment and upload it to the SQL database using c#/entity framework. However, there are always some glitches I can't seem to get around. So, I will describe exactly how one of the forms should work.
There is a form where the user has to enter several fields related to his educational background. School attended, dates, location, etc. The degree must be attached. I envision the user clicking a browse button, selecting a file, the upload immediately begins with a progress indicator. The progress indicator is measuring real progress and not just an animated gif. When the upload is complete there would be a success indicator, the original option to select a file would disappear, and an option to view or delete the uploaded file is then available. If the file is deleted, we go back to the original layout where a new file can be selected. This is similar to how Gmail attachments work, though not exactly. The user can then click Next which submits the rest of the form and we needed to tie the uploaded attachment to the other form data (which is mostly implemented already).
Because the attachment happens at a different time then the form submission, the attachment is saved to a separate database table and then tied back to the table where the form data is saved via an ID. Please keep in mind I have 99% of this written. It live where I can demo it for you. The only issue is with the attachment. Also, if you have a better idea of how to handle this use case, please make suggestions.
I have tried the following things with the noted issued:
MS AJAX AsyncFileUpload - Works great, but doesn't give real file upload progress. Also, the next postback seems to write the file to the DB a 2nd time.
MS AJAX AjaxFileUpload - Also uploads great, but the control is ugly, and I'm not certain if there is a way to style it.
Uploadify - Also uploads great, but I don't understand how to pass data back-and-forth to the server. For example, I need to pass back the ID of the of the database row where the file gets saved.
Any and all help is appreciated. Thanks!