Detail Information:http://www.codeproject.com/articles/482800/fileplusuploadplusinplusupdatepluspanel
Http://aspsnippets.com/Articles/Using-FileUpload-Control-inside-ASP.Net-AJAX-UpdatePanel-Control.aspx
The Postbacktrigger property must be set
<asp:updatepanel id="UpdatePanel1"runat="Server"Updatemode="Conditional"> <ContentTemplate> <asp:fileupload id="Fileuploadimage"runat="Server"></asp:FileUpload> <asp:button id="Btnupload"runat="Server"text="Upload Image"onclick="Btnupload_click"/> <br/> <asp:button id="Btnprocessdata"runat="Server"text="Process Data"onclick="Btnprocessdata_click"/><br/> <asp:label id="lblmessage"runat="Server"text="Image uploaded successfully."visible="false"></asp:label><br/> <asp:updateprogress id="UpdateProgress1"runat="Server"Associatedupdatepanelid="UpdatePanel1"> <ProgressTemplate>Please wait image isgetting uploaded ....</ProgressTemplate> </asp:UpdateProgress> <br/> <b>p Lease view the below image uploaded</b><br/> <asp:image id="img"runat="Server"Width=" -"height=" -"imagealign="Middle"/> </ContentTemplate> <Triggers> <asp:postbacktrigger controlid="Btnupload"/> <asp:asyncpostbacktrigger controlid="Btnprocessdata"/> </Triggers> </asp:UpdatePanel>
View Code
To add a file Upload control to the update Panel control to upload files