Ajax Toolkit AsyncFileUpload not working inside a normal Panel

大城市里の小女人 提交于 2020-02-06 03:58:15

问题


Referring to the following: Ajax Asyncfileupload doesn't work as soon as I put it in a control

I am having the same issue. I am not using a Master page though. I have an AsyncFileUpload control in a Panel, within an update panel.

Any ideas as to what could be causing the issue?


回答1:


When you use AsyncFileUpload you must set the right params in the form tag, that is placed in your Page or MasterPage:

 <form id="form1" runat="server" enctype="multipart/form-data" method="post">

If you don't set the right enctype and method UploadedComplete will never fire, and you won't be able to get FileUpload.FileBytes since FileUpload.HasFile returns true only during UploadedComplete execution.

I suppose that in your page you haven't set the right enctype.

Besides, prevoius versions of AsyncFileUpload didn't work on Chrome. 2011 July version (4.1.50731.0) solved the problem.



来源:https://stackoverflow.com/questions/3561106/ajax-toolkit-asyncfileupload-not-working-inside-a-normal-panel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!