Accordian ajax control gives JScript runtime error

感情迁移 提交于 2019-12-02 04:50:50

问题


I'm using Accordian control of ajax toolkit.

I'm getting the following error:

Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors.
Parameter name: element


回答1:


I just ran into this problem as a result of having commented out a block of old HTML (<!-- ... -->) which contained textboxes and maskededitextenders.

When I removed that HTML the error stopped occurring.




回答2:


There could be a whole host of problems associated with this error. Not much to go on, but here are some possibilities

  1. Check the visibility settings of the Accordion. Apparently if it is set to visible=false or style="display:none" it may not hook to the extender correctly.
  2. Also check for any commented out Accordion controls (i.e. comment blocks). This may cause the ScriptManager to look for an Accordion that is not there.
  3. Finally, in case it is not the Accordion throwing the error, make sure each control and its extender are in the same UpdatePanel.

Hope this helps!




回答3:


We just had this problem as a result of not explicitly setting an ID on an AJAX control. You might want to check that you're setting the ID property.




回答4:


I was building my ID dynamically based on an effective date. So the ID I was trying to assign was like "tp03/14/2015". This was bad.

Make sure the ID you're assigning doesn't have slashes in it.




回答5:


I hope this saves some people some time.

The issue for me was a control (required field validator) w/ the property set:

 EnableClientScript="false"


来源:https://stackoverflow.com/questions/981106/accordian-ajax-control-gives-jscript-runtime-error

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