Setting a default value for the fileupload web control

R

Ryan

Is there any way to set the value property of the file upload web
control in .net? Microsoft states that it is a read only property but
I was wondering if others have worked around this to achieve the same
thing I'm trying to do. I am simply trying to default to the location
of a file when it is known on the client when the browse button is
click on the file upload web control. Basically if the user has
uploaded a file previously and we know the original filename including
absolute path, if they want to upload a new version, is there a way to
tell the control to open the file dialog to that location? Thanks.
 
T

Teemu Keiski

Hi,

<INPUT type=file...> HTML Element (which upload control renders as) doesn't
allow you to modify the value programmatically in any way. It is security
restriction. However, in some Netscape docs was stated that with some very
special permissions it is possible, but this is *very* implementation
dependant (and thread in which this was discussed is old). IE does not allow
it in any case, AFAIK.
 
R

Ryan

Can you please point me in the right place to find out why this is a
security restriciton on breifly dsecribe why it is a security
restriction. Thanks.
 
O

Oleg Slyusarchuk

Hi, Ryan

If this would be possible, the following would be posiible to:
1. Set up value for for file upload.
2. on page "onload" event start uploading the file.
3. as you can imagine, it's possible to point out to any of your files.
Easy.

Oleg
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top