Click here to Skip to main content
15,902,032 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have solution for file upload control in update panel as follows

XML
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
          <Triggers>
              <asp:PostBackTrigger ControlID="Button5" />
          </Triggers>
          <ContentTemplate>
              <asp:FileUpload ID="FileUpload2" runat="server" /><br />
              <asp:Button ID="Button5" runat="server" Text="Button" OnClick="Button5_Click" />
          </ContentTemplate>
      </asp:UpdatePanel>



But it will give the result as HTTP Error 400 - Bad Request.
Posted
Comments
Sunny_Kumar_ 18-May-12 6:28am    
Hi madhu, you must have something going on your page apart of the code you mentioned over here. I gave the code a real try and it works without any hassle. I suggest you to check the rest of your code again.
Happy Coding :)

1 solution

Hi,

instead of using update panel u can upload file asynchronously using ajax
for this check it out following
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/AsyncFileUpload/AsyncFileUpload.aspx[^]

Best Luck
happy Coding:)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900