This question is locked. New answers and comments are not allowed.
Hello,
I have a Upload control configured like this
This is the code for save routine:
When the function is executed the parameter immagini is null.
Have an idea?
Thank in advance.
Mirko
I have a Upload control configured like this
When try to upload files the Upload control don't pass the list of selected files to Save routine.@(Html.Telerik().Upload().Name("UploadImages").Multiple(false).Async(async => async.Save("SalvaImmaginePrincipale","Immobile").Remove("EliminaImmaginePrincipale","Immobile").AutoUpload(true)))
This is the code for save routine:
public ActionResult SalvaImmaginePrincipale(IEnumerable<HttpPostedFileBase> immagini){ List<HttpPostedFileBase> imgList = immagini.ToList(); if (imgList.Count == 1) { var file = imgList[0]; string filename = Path.GetFileName(file.FileName); string path = Path.Combine(Server.MapPath("~/imgimmobili"), filename); file.SaveAs(path); } return Content("");}When the function is executed the parameter immagini is null.
Have an idea?
Thank in advance.
Mirko