Guest User

Untitled

a guest
Jun 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. httpFileCollection uploads=HttpContext.Current.Request.Files;
  2.  
  3. //Store
  4. Session["UploadedFiles"] = uploads;
  5.  
  6. //Retrieve
  7. if (Session["UploadedFiles"] != null)
  8. {
  9. //try-catch blocks omitted for brevity. Please implement yourself.
  10. HttpFileCollection myUploads = (HttpFileCollection)Session["UploadedFiles"];
  11.  
  12. // Do something with the HttpFileCollection (such as Save).
  13.  
  14. // Remove the object from Session after you have retrieved it.
  15. Session.Remove("UploadedFiles");
  16. }
Add Comment
Please, Sign In to add comment