When I save a file, I would like to return the name of the file to my page and append it to a list. I am not sure how to approach this and am very new with mvc4. Can someone show me how to get the file name from the json after the controller has returned the Content? Thanks!
Line that returns file name: (From the controller) return Content("{\"name\":\"" + r[0].Name + "\"}", "application/json");
Form submission from .cshtml
@using (Html.BeginForm("SaveDropzoneJsUploadedFiles", "Home", FormMethod.Post, new { enctype =
"multipart/form-data" }))
{
<input type="file" name="file" multiple/>
<input type="submit" name="Submit" id="Submit" value="Upload" />
<div id="fileNames"></div>
}