Error while running the website using AjaxControlToolkit

一笑奈何 提交于 2019-12-14 03:00:17

问题


I am using AjaxControlTookit in my website. The website was running fine until I added the HTMLEditorExtender. Then the exception which came was

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)

I resolved it using a suggestion on one of the questions on stackoverflow.com only. Solution was to delete the ajax control kit tab from the toolbox and then again add the tab and the items and update the dll file.

I updated the DLL file and performed the steps given there. But now the compile time error is coming. Which is as follows

Error 4 Could not load file or assembly 'AjaxControlToolkit, Version=4.1.60501.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Please tell me what is the solution to this.


回答1:


Look for System.Web.Extensions.Design in assembly folder and refer in you code accordingly.




回答2:


Make sure you are adding a scriptmanager to the page before you use any controls. Also, if you are using javascript, try moving your code to the bottom of the page. I have found that if I dynamically add content to the head of the application, from the codebehind, I will get a similar error.




回答3:


Thanks everyone I solved this puzzle by resetting it to previous error situation i.e.

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)

You can check the solution here: Error after adding AjaxControlToolkit's HTMLEditorExtender which is my another question for this error.



来源:https://stackoverflow.com/questions/15133631/error-while-running-the-website-using-ajaxcontroltoolkit

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