I'm trying to upload a file in asp.net with the HtmlInputFile control. The
file uploads and saves on the server... The only problem is it's
HtmlInputFile.PostedFile.ContentLength property = 0...
The code that uploads the file is taken directly from the MSDN help files...
Anyone have any suggestions?
Thanks in advance,
Garland R. Frye
Hi Garland
Be sure that your form has enctype="multipart/form-data", otherwise it
does not send the file or the server can not recognize it.
For debugging there is something helpful to see, what comes up to the
server together with the posted request:
Page.Request.SaveAs("c:\\temp\\completeRequest.txt",true);
There should be your file inside somewhere.
Klaus
> I'm trying to upload a file in asp.net with the HtmlInputFile control.
The
> file uploads and saves on the server... The only problem is it's
> HtmlInputFile.PostedFile.ContentLength property = 0...
> The code that uploads the file is taken directly from the MSDN help
files...
> Anyone have any suggestions?
>
> Thanks in advance,
> Garland R. Frye
>
>