Hi I am having a file upload in user control in UpdatePanel
Now I tried to find the control in the my aspx page and added the trigger dynamically but still I face the same problem and my Fileupload.hasfile returns false always.
Any Ideas
If some one has the same problem My solution was: Actually the fileUpload control works with the update panel if you register a post back trigger. The the problem I had was solved.
The actual solution was a very triky,
You need to change the form enctype to "multipart/form-data". If you 开发者_如何学Pythondont do this, the fileUpload control doesnt work in the update panel.
By just adding that attribute to my form in master page my problem is solved. Just check this out: http://knowledgebaseworld.blogspot.com/2009/02/file-upload-not-working-with-update.html
Thanks
Actually the fileUpload control works with the update panel if you register a post back trigger. The the problem I had was solved.
The actual solution was a very triky,
You need to change the form enctype to "multipart/form-data". If you dont do this, the fileUpload control doesnt work in the update panel.
By just adding that attribute to my form in master page my problem is solved. Just check this out: http://knowledgebaseworld.blogspot.com/2009/02/file-upload-not-working-with-update.html
I have done this with telerik before, which is another library for ajax. It seems impossible to have fileuploadcontrol with a ajax panel. Try by removing the ajax panel, and this should solve your problem. So how I handle for other controls that require ajax either put those controls into a ajaxpanel, or I use explict ajax event which is included in telerik.
File upload does not work in UpdatePanel and it required complete postback to work. Use Jquery file upload for ajax based file upload.
精彩评论