Re: Button to launch the "File Open" dialog

From: Eric Newton (ericnewton76_at_hotmail.com)
Date: 08/15/03


Date: Fri, 15 Aug 2003 14:41:08 -0400


It can be done with a Windows Forms control, but the <INPUT type=file> would
be the easiest way, it being designed for web pages and all...

IMO, stick with the <input type=file>, it'll save you a lot of headache
further down the road.

-- 
Eric Newton
eric@ensoft-software.com
C#/ASP.net Solutions developer
"Mr Gordonz" <paul@mobius.net.au> wrote in message
news:%23cskJC1YDHA.212@TK2MSFTNGP12.phx.gbl...
> 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
>
>