.Net4.x MVC
Upload and save some file.
FileUploadViewModel
1 | public string Foo { get; set; } |
FileUploadController
1 | [ ] |
View FileUpload.cshtml
1 | @using (Html.BeginForm("SomeAction", "FileUpload", FormMethod.Post, new { encType = "multipart/form-data", id = "uploadForm" })) |
Client side post-back after the file changes is triggered by @onchange
1 | function Save() { |