Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

uploading files

Status
Not open for further replies.

jimberger

Programmer
Jul 5, 2001
222
0
0
GB
Hello,

I have a upload facility to upload a file - however, I do a check to see if the file already exists, if it does then I want to say "Do you want to overwrite this file?" with yes or no buttons. fine so far. However, on pressing yes I want to overwrite the file, the problem is that when I lose what ever was in file.postedfile so I can;t reupload until the usere selects the file again. is they any way i can store the file uploaded in a session variable so I can use it again when the user clicks to overwrite?

thanks your help
jim
 
Can you not persist it in viewstate? or do you not want to use viewstate?

viewState("PostedFile") = file.postedfile.FileName

i am sorry as i havnt written upload code for a while so my knowledge of the properties is a bit rusty.

Rob



---------------------------------------
 
Or you could save it to a temporary folder on the server and then use that copy


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top