Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
file upload within update panel not working when using AsyncPostBackTrigger
Posted
Updated 5-Jan-12 17:58pm
v2
Comments
infobeena 6-Jan-12 1:16am    
Thanks

File Upload will not work with a partial post back.

Use PostBackTrigger instead as a trigger and it should work fine.

[Edit]
This discussion explain the reason in more details - FileUpload Doesn't Work When Nested In UpdatePanel? C#[^]
[/Edit]

Hope that helps!
 
Share this answer
 
v2
Comments
Meysam Toluie 2-Jul-16 0:56am    
I am changing a project which I didn't created myself. the developer had some terrible implementation on this project. specifically he put the contentplaceHolder of master page in an updatePanel so I can not use PostBackTrigger. Is there another solution?
Ankur\m/ 15-Jul-16 5:11am    
Sorry for late reply but I just saw your post.
You might have to use AsyncFileUpload in AjaxControllToolkit (3rd answer in the above mentioned link). If that doesn't help, try using jQuery file upload plugin.
Please see below linke, It worked well.
http://www.aspsnippets.com/Articles/Using-FileUpload-Control-inside-ASP.Net-AJAX-UpdatePanel-Control.aspx
 
Share this answer
 
<triggers> <asp:postbacktrigger controlid="btnUpload" xmlns:asp="#unknown">
btnUpload should be upload button id. put this code in aspx code.
 
Share this answer
 

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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