Nope. That won't work, I promise, because it's impossible to change that. The FileUpload control's value is
ReadOnly, so you will never be able to alter its value. And there is good reasoning for this. If it was not read only, then you can have some javascript change the value of it to a different file path than the user selected, and then it would
upload that file to the server without the user's permission. That would be tragic. Make sense?
Hope this helps! Please mark the helpful post(s) as Answer.
JoshStodola
Star
13736 Points
3177 Posts
Re: The textbox in a FileUpload control
Oct 10, 2007 05:09 PM|LINK
Nope. That won't work, I promise, because it's impossible to change that. The FileUpload control's value is ReadOnly, so you will never be able to alter its value. And there is good reasoning for this. If it was not read only, then you can have some javascript change the value of it to a different file path than the user selected, and then it would upload that file to the server without the user's permission. That would be tragic. Make sense?
Hope this helps! Please mark the helpful post(s) as Answer.