tags:

views:

498

answers:

2

hi 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

please help me

A: 

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!

Matthew Jones
I'm not using the update panel.
Aarsh Thakur
Still, check your visibility settings. Controls with visible=false are not rendered to the page, so the extender cannot find it and, poof!, error. Check this thread for more info: http://forums.asp.net/t/1038420.aspx
Matthew Jones
A: 

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.

StriplingWarrior

related questions