HtmlInputFile Problems

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Lan said:
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">
 
Back
Top