Ajax Toolkit AjaxFileUpload throw exception

我只是一个虾纸丫 提交于 2019-12-13 15:23:35

问题


I have an entry form which I want to add a file uploader I added a toolkit script manager to the master page then i added an ajaxfileupload control <http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/AjaxFileUpload/AjaxFileUpload.aspx>

the aspx looks like this

<ajaxToolkit:AjaxFileUpload ID="AjaxFileUpload1" ThrobberID="myThrobber" ContextKeys="fred"
                AllowedFileTypes="jpg,jpeg" MaximumNumberOfFiles="2" runat="server" UploadedComplete="AjaxFileUpload1_UploadedComplete" />

the method AjaxFileUpload1_UploadedComplete is empty for now.

I got this exception and no event is firing except for the page_load

Sys.ArgumentException: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON.


回答1:


I realise this is an old question but i think this is caused by a 'bug' in the control. It appends query string parameters but assumes there are no existing parameters.

There are details and a fix here: https://ajaxcontroltoolkit.codeplex.com/workitem/27149 (involves changing the source and rebuilding the toolkit)



来源:https://stackoverflow.com/questions/10664264/ajax-toolkit-ajaxfileupload-throw-exception

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