Saturday, March 24, 2012

Uploading File doesnt work when using UpdatePanel!

Hi,

Uploading files works fine but when i tried to include everything inside the UpdatePanel then i can no longer upload. The reason is that on my PostBack, the input values(file1, file2, file3, file4) have empty values..

<tableborder="0"cellspacing="0"cellpadding="0"style="border-collapse: collapse;">

<trid="fileInput1"><tdalign="left"class="VerdanaXXSmallBlue">1) </td>

<td><inputid="file1"type="file"runat="server"class="VerdanaXSmallBlue"style="width: 100%"/></td></tr><trid="fileInput2">

<tdalign="left"class="VerdanaXXSmallBlue">2) </td>

<td><inputid="file2"type="file"runat="server"class="VerdanaXSmallBlue"style="width: 100%"/></td></tr><trid="fileInput3"><tdalign="left"class="VerdanaXXSmallBlue">3) </td><td><inputid="file3"type="file"runat="server"class="VerdanaXSmallBlue"style="width: 100%"/></td></tr><trid="fileInput4"><tdalign="left"class="VerdanaXXSmallBlue">

4)

</td><td><inputid="file4"type="file"style="width: 464px"class="VerdanaXSmallBlue"runat="server"/></td></tr></table>

Hi Kiril,

The Ajaxdocumentation states that theFileUpload control is not compatible with partial-page updates and is therefore not supported inside an UpdatePanel. To use aFileUpload control inside anUpdatePanel control, set the postback control that submits the file to be aPostBackTrigger for the panel.

HTH


cool. thanks

No comments:

Post a Comment