Button to launch the "File Open" dialog

From: Mr Gordonz (paul_at_mobius.net.au)
Date: 08/15/03


Date: Fri, 15 Aug 2003 18:13:21 +0100


Hi all,

This is actually a repost of a question posted on
microsoft.public.dotnet.framework.aspnet. I have posted it to this
newsgroup because I suspect the problem is security related.

I want to put a button on a page, and when the user clicks it, the standard
Windows "Open File" dialogue box opens, and the user can browse/select a
file on their PC. Having selected a file, the user clicks Open, and I then
want to capture the file path and name in a string variable. Finally, I
want to upload the file to the server.

BUT: I don't want to use an <input type="file"> control. I know how to do
it with an input control - if possible, I really want to accomplish this
WITHOUT using an input control.

Can this be done? I am beginning to think the answer is no - for security
reasons

Cheers,

MG