Search code examples
javascriptasp.netscript#componentart

ScriptSharp seems to be incompatible with ComponentArt Treeview, how to fix it?


I have a page that uses a TreeView control from ComponentArt.

If I add a reference to mscorelib.debug.js to that page I get this error:

Uncaught TypeError: Cannot call method 'apply' of undefined Type
$initializeBase                                    mscorlib.debug.js:1177 
ComponentArt_TreeViewNode                          ScriptResource.axd:1
ComponentArt_TreeView.GetItemFromStorage           ScriptResource.axd:1 
ComponentArt_TreeView.Nodes                        ScriptResource.axd:1 
ComponentArt_TreeView.Render                       ScriptResource.axd:1 
ComponentArt_TreeView.Initialize                   ScriptResource.axd:1
window.ComponentArt_Init_ctl00_Menu1_TreeView      MyPage:197 
(anonymous function)                               MyPage:201

If I take off the mscorelib.js reference, or I set "Visible = false" to the treeview it doesn't give any error.

I am not sure I will continue with ScriptSharp as it has failed on me too many times now.

But still I wanted to tell the community about this and see if there is a fix.

The version of ComponentArt that I use is 2008_1_1085_35

And I use ScriptSharp 0.7.4


Solution

  • I think you had asked about script# and asp.net update panels as well. This is in the same realm/same underlying issue.

    Its likely the componentart component also relies on msajax (which is no longer the preferred framework in asp.net given jQuery) doesn't work with script#.