Hi,
To achieve this, you do not need to submit the form. you can refer to example page "multiple_files_upload". it has the same code.
- public ActionResult multiple_files_upload(string myuploader)
- {
- using (CuteWebUI.MvcUploader uploader = new CuteWebUI.MvcUploader(System.Web.HttpContext.Current))
- {
- uploader.UploadUrl = Response.ApplyAppPathModifier("~/UploadHandler.ashx");
-
- uploader.Name = "myuploader";
- uploader.AllowedFileExtensions = "*.jpg,*.gif,*.png,*.bmp,*.zip,*.rar";
-
- uploader.MultipleFilesUpload = true;
-
- uploader.InsertButtonID = "uploadbutton";
-
- ViewData["uploaderhtml"] = uploader.Render();
-
- if (!string.IsNullOrEmpty(myuploader))
- {
- List<string> processedfiles = new List<string>();
-
- foreach (string strguid in myuploader.Split('/'))
- {
- Guid fileguid = new Guid(strguid);
- CuteWebUI.MvcUploadFile file = uploader.GetUploadedFile(fileguid);
- if (file != null)
- {
-
-
-
- processedfiles.Add(file.FileName);
- }
- }
- if (processedfiles.Count > 0)
- {
- ViewData["UploadedMessage"] = string.Join(",", processedfiles.ToArray()) + " have been processed.";
- }
- }
- }
- return View();
- }
Regards,
Ken