pinki
pinki

Reputation: 1418

FileUpload problem

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 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

Thanks

Upvotes: 0

Views: 947

Answers (3)

pinki
pinki

Reputation: 1418

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

Upvotes: 1

Saurabh
Saurabh

Reputation: 5727

File upload does not work in UpdatePanel and it required complete postback to work. Use Jquery file upload for ajax based file upload.

Upvotes: 0

C_Rance
C_Rance

Reputation: 661

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.

Upvotes: 0

Related Questions