|
|
Rank: Newbie
Groups: Registered
Joined: 8/17/2009 Posts: 4 Location: Englewood, CO
|
Hello, We envision our upload page with 2-3 fields corresponding to the video to upload and an upload button at the bottom i.e.
Video Name Artist Name Browse Video Name2 Artist Name2 Browse2
Upload All
Can we create this functionality with this control? We are using ASP.NET MVC 1.0 with c#.
Thanks!
|
|
|
Rank: Administration

Groups: Administrators
Joined: 7/7/2005 Posts: 1,586 Location: Scottsdale, AZ
|
SlickUpload is designed very modularly. There are two ways to approach this problem:
- If you want to retain all the dynamic functionality of the SlickUpload control, you can use it's templating functionality. Take a look at the AdditionalFields sample (available online here: http://krystalware.com/Products/SlickUpload/Demos/AdditionalFields/DefaultCS.aspx, or in the download package). Basically, you can template the item that is displayed for each file, adding your own controls if desired. You can then access the fields associated with each file via the FormValues collection of each file.
- If you want to hardcode the number of rows and have exposed browse buttons like you show in the example below, you could sidestep using the SlickUpload control and use some of its component controls instead. The SlickUpload control is actually made up of four controls -- the FileSelector (the add/browse button to select files), the FileList (to display selected files), the UploadProgressDisplay (to display progress during an upload), and the UploadConnector (to tie them all together). In this case, you would use the UploadProgressDisplay and UploadConnector controls to display progress and manage the upload, and then just use normal <input> tags or ASP.NET controls to create the file selection interface. If you want to go this route and would like an example, let me know and I'll whip one up for you.
Let me know if you have any other questions.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 8/17/2009 Posts: 4 Location: Englewood, CO
|
Chris,
This might work for us. I need to convert this to MVC, but that should be OK. I will post more questions if I hit a wall...
Thanks for your help! Harshu
|
|
|
Rank: Newbie
Groups: Registered
Joined: 8/17/2009 Posts: 4 Location: Englewood, CO
|
Chris,
Couple of other questions:
1. How do I set maxfiles element dynamically, either through JQuery/Javascript or programatically using ViewData/TempData in Asp.NET MVC?
2. Validation - is there a minimum we can set without which the form will not upload?
Thanks! Harshu
|
|
|
Rank: Administration

Groups: Administrators
Joined: 7/7/2005 Posts: 1,586 Location: Scottsdale, AZ
|
Answered on your other thread...
|
|
|
Rank: Newbie
Groups: Registered
Joined: 1/24/2012 Posts: 3
|
At the risk of resurrecting a dead thread, is there still a way to do this? We want to include a name and email address along with multiple file uploads. We're building this in MVC3 with Razor, but I don't see this example on your demos page any longer. Can I create a viewmodel that contains a Name, Email, and UploadSession? Will the modelbinder work that way?
Thanks,
Aaron
|
|
|
Rank: Administration

Groups: Administrators
Joined: 7/7/2005 Posts: 1,586 Location: Scottsdale, AZ
|
How is your form set up? Are you trying to provide a name and email address per file? Or a name and email address, and then a list of files?
|
|
|
Rank: Newbie
Groups: Registered
Joined: 1/24/2012 Posts: 3
|
It would be a name and email address, then a list of files.
|
|
|
Rank: Administration

Groups: Administrators
Joined: 7/7/2005 Posts: 1,586 Location: Scottsdale, AZ
|
You should be able to use an action method like:
public ActionResult Upload(string name, string email, UploadSession session);
for sure. I think the model binding will also work into a model object, but we haven't tested all permutations of that. Let me know if you run into any issues.
If you are having issues with model binding, you can also access the current session via the SlickUploadContext.CurrentUploadSession accessor.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 1/24/2012 Posts: 3
|
Great, thanks for the help. I'll let you know if I run into any issues.
|
|
|
|
Guest |