I am trying to use the HtmlInputFile control to upload files from a clients
machine to the server. However, when I attempt to access the postedFile
element of the control, postedFile is null, resulting in a crash. Does
anyone have any idea why htmlInputFile.postedFile would be null, even if I
have chosen a file?

Thanks,
Lan

Re: HtmlInputFile Problems by Jacky

Jacky
Thu Jul 21 20:40:17 CDT 2005

Lan wrote:
> I am trying to use the HtmlInputFile control to upload files from a clients
> machine to the server. However, when I attempt to access the postedFile
> element of the control, postedFile is null, resulting in a crash. Does
> anyone have any idea why htmlInputFile.postedFile would be null, even if I
> have chosen a file?
>
> Thanks,
> Lan


Did you add 'encType="multipart/form-data"' same the following example
in <form> ?

<form id="InputUpload" method="post" encType="multipart/form-data"
runat="server">

--
Jacky Kwok
jacky@alumni_DOT_cuhk_DOT_edu_DOT_hk
jacky@compose_DOT_com_DOT_hk