Not sure but it looks like your want the other way round compared with your
workaround (i.e. fill programmatically the HtmlInputFile (input type=file
HTML tag) from an existing value).
To make sure, the problem is that the "value" property for this tag is read
only. the only mean to fill this field with the value is having the user
select a file. This is done for safety reason as otherwise you could upload
files from a web client without user permission.
And the only mean to upload a local file (with HTML alone) is to use this
tag.
A trick could be to have some fields inside an IFRAME, it would allows to
refresh those fields without touching the HTMLInputFile but my first option
would be rather to see if I can change the UI...
Patrice
--
"UJ" <fr**@nowhere.com> a écrit dans le message de
news:%2***************@TK2MSFTNGP12.phx.gbl...
Can anybody give me help on this?
Again the problem is - I have a page with an HTMLInputFile that I want to
preload with a value.
Can anybody make any suggestions on a way around this? The only thing I
can think of is to make two fields - one that is the name of the file to use,
and one used to upload the file. They would have to fill in the upload
file first - then that would set the value.
TIA - Jeffrey.
"Bruce Barker" <br******************@safeco.com> wrote in message
news:uQ**************@TK2MSFTNGP10.phx.gbl... browser security prevents this, so even if you bypass the asp.net check,
it will be ignored.
-- bruce (sqlwork.com)
"UJ" <fr**@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... Guys,
I know this isn't the appropriate place to post this because it's HTML
not ASP.Net but I need some guidance. I have a web page with an
HTMLInputFile on it. The person enters the stuff, that's all great.
They go to the next page and I allow them to click a button to go back a
page to change values. When I go back one page, I want the HTMLInputFile to
be filled in with the previously loaded value (which I have saved
somewhere) but there's no way to set it. I get a The value property on
HtmlInputFile is not settable error message.
Anybody have any suggestions on what I can do?
TIA - Jeffrey.