开发者

FileUpload in UpdatePanel

开发者 https://www.devze.com 2023-01-12 04:37 出处:网络
I have a problem with uploading file to server. I have panels of information on my page. Each panel specify a step of information. And on the last panel, I have a FileUpload control to enable user att

I have a problem with uploading file to server. I have panels of information on my page. Each panel specify a step of information. And on the last panel, I have a FileUpload control to enable user attach a file. All panels are placed inside UpdatePanel.

But, I am not receiving posted file on the server. I tried doing full postback on 开发者_Go百科last step by registering my Save button as PostbackTrigger like below. But, this is not doing the work.

I debugged the page many times & tried several ways to solve this. I found that, if I place my FileUpload control in a panel that is initially hidden & get visible in later step, FileUpload doesn't work. On the other hand, I tried placing FileUpload out side all step panels but inside UpdatePanel, it works. How?

Friends, I want to show FileUpload control on the last Panel. Please guide me.

Regards, Akif


This is not a limitation of ASP.NET or UpdatePanel. It is a limitation of AJAX which doesn't allow you to upload files. That's why placing the upload control outside the UpdatePanel works as you are performing a full postback. You could use some technique such as hidden iframes, jquery plugins, flash, etc...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号