0

I've just updated to the AJAX Control Toolkit 3.5, changed the ScriptManager to the ToolkitScriptManager in my master page and now the following javascript error occurs when an Edit button is clicked:

"Object doesn't support this property or method"

The line of code cuasing the error is:

this._destroyTree(updatePanelElement);

Any initial ideas before I post masses of code?

4 Answers 4

1

I had the same problem while I was migrating my project from 3.5 to 4.0 .NET Framework

I saw a very simple solution in this URI:

http://updatepanelshrinker.codeplex.com/discussions/397223

User comments that _destroyTree method has been deprecated in .NET 4.0+ versions. The new function to use is:

//var prm = Sys.WebForms.PageRequestManager.getInstance();
//prm._destroyTree(object);
Sys.Application.disposeElement(object, true);

Regards!

0

My initial guess is that "this" is referring to something that doesn't implement _destroyTree, or _destroyTree doesn't accept a parameter of type updatePanelElement

Keep in mind that javascript is a little different than C# in the fact that "this" refers to the current owner of the exectuing method.

1
  • Yes I need to confirm this. I'm waiting for my IE Options Advanced tab to be enabled so I can enable script debugging.
    – empo
    Commented May 14, 2010 at 15:59
0

I've run into similar issues going from ScriptManager to ToolkitScriptManager and while it isn't an elegant solution, the thing that has worked for me is to remove the ScriptManager, rebuild the solution (even if it throws errors) then add the ToolScriptManager in and rebuild.

For some reason the project was hanging on to the old object type reference (ScriptManager) and causing problems. It wasn't until it was removed and rebuilt (thus removing all instances of the object from the project) and added in that all the proper connections were set.

0
0

I used a slightly older version of AJAX ControlToolkit 3.5 and the errors have now gone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.