Another way to get around this bug was a client-side solution. In fact this is the best workaround solution, but you have to tell all your visitors to set the internet option:
Go to IE Settings, on the "General Tab" in Temporary Internet Files.
Set "Check for Newer Version of Stored Pages" to "Never" or "Automatically" on the client machines.
Instead, I was looking for a server-side solution for this problem:
Disabling the + / - clickevents which causes the tree to lock up on certain browsers when the +/- are clicked a couple of times. (the bug only occures on some IE6 browser version with XP when you click on +/-).
If the collapse and expand events dont trigger a postBack anymore, the .HTC file and images are not refreshed and the bug cannot occur. This, ofcourse, only works if you dont need the tree to postback on collapse/expands.
What I did to make this work was:
- set the tree to autoPostBack=False
- add explicit postBack calls in javascript just for the click and check events. Be sure to replace myTree with your tree-ID:
Me.myTree.Attributes.Item("oncheck") = "javascript: if (this.clickedNodeIndex != null) this.queueEvent('oncheck', this.clickedNodeIndex); window.setTimeout('__doPostBack(\'myTree\',\'\')', 0, 'JavaScript');"
Me.myTree.Attributes.Item("onselectedindexchange") = "javascript: if (event.oldTreeNodeIndex != event.newTreeNodeIndex) this.queueEvent('onselectedindexchange', event.oldTreeNodeIndex + ',' + event.newTreeNodeIndex); window.setTimeout('__doPostBack(\'myTree\',\'\')', 0, 'JavaScript');"
Note:
Instead of calling the __DoPostBack function you better write your own postBack function since its part of the inner ASP.Net framework. The function only gets added when there are 1 or more controls with AutoPostBack=True on the page.
Hope this helps out others, since it worked for me.
Greetings,
Arjen O.