He said he didn't want to upload them. If you put an input type=file HTML
element in a page, and the user browses to a file and submits the form, the
file will be uploaded, regardless of whether the app saves it or not. With a
2GB file, this could take quite a while to run.
Unfortunately, there is no HTML element for simply picking a file name.
There are a couple of alternatives:
1. Use the input type=file to have the user browse for the file. On submit,
copy the value from the input type=file element, and put it into a hidden
form field. Then remove it from the input type=file field, so that it
doesn't upload.
2. Write a client-side ActiveX control or Java applet to do this.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Ken" <kf******@hotmail.com> wrote in message
news:uK**************@TK2MSFTNGP10.phx.gbl...
Add this to the HTML designer page
<INPUT id="MyFile" type="file" name="MyFile" runat="server">
Then you can refer to the 'MyFile' object in the code behind.
MyFile.PostedFile.FileName
"Dave56" <no****@co.lane.or.us> wrote in message
news:uw**************@TK2MSFTNGP10.phx.gbl... Hi.
I know how to use <input type=file runat=server> to upload a file to the
webserver.
However, my files are 2gb and I don't want to up load them.
What I would like to be able to do is to just get the filename of the
file the user selected (for example "c:\temp\movie.wmv").
I also want validation that requires the selection of a .wmv file.
What is the best way to do that?
Thanks