FileUpload Control PostedFile.FileName is ReadOnly

L

Larry Rebich

I would like to use the FileUpload Control on an Asp.Net form. And I'd like
to save and restore the FileName between sessions. It seems the property is
read only.

Is there a way to browse for a local file from an Asp.Net page and retain
the file name from session to session?

I've not been able to find anything using Google!

Thanks and Cheers,
Larry Rebich
 
S

Steve C. Orr [MCSD, MVP, CSM, ASP Insider]

The FileUpload control does not allow this for security reasons. If it did
allow such things, hackers could set the default filename to any standard
file on your system to queue it for upload to their servers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top