We help IT Professionals succeed at work.

Passing asp:FileUpload Data for Processing on Another Page

BetaPictoris
BetaPictoris asked
on
Is it possible for a user to select a file for download using the FileUpload control (in ASP.NET), and then passing that information to another page which has the code to download the file from the user? How would you do this?

Thanks.
Comment
Watch Question

You could maybe try and use a session.
First page:
Session("FileUpload") = FileUpload1

Second Page:
Dim objFlieUpload As FileUpload = DirectCast(Session("FileUpload"),FileUpload)

Just a thought that sould be simple to test.
 

Author

Commented:
Thanks. That pointed me in right direction. The C# equivalent is:

FileUpload objFileUpload = new FileUpload ();
objFileUpload = (FileUpload) Session ["FileUpload"];

Explore More ContentExplore courses, solutions, and other research materials related to this topic.