Guest User

Untitled

a guest
Aug 15th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. Is there a way to pass back the Request.Files in the view model on post (ASP.NET MVC 3)?
  2. [HttpPost]
  3. public ActionResult UpdateStatus(StatusViewModel vm)
  4. {
  5. bool updated = HandleUpdate(Request.Files, vm);
  6. ...
  7. return View("Updated");
  8. }
  9.  
  10. public ActionResult Method(HttpPostedFileBase fileUploaded)
  11.  
  12. public ActionResult Method(HttpPostedFileBase[] filesUploaded)
  13.  
  14. public class MyModel{
  15. public string Name{get; set;}
  16. public HttpPostedFileBase FileUploaded{get; set;}
  17. }
Add Comment
Please, Sign In to add comment