Stefan,
Great, I've managed to make it working with FlyTreeView.
First, you need to fix the Default.aspx.cs file at Page_Load method:
- remove the
//Page.ClientScript.RegisterClientScriptResource(typeof(NineRays.WebControls.FlyTreeView), "_70");
- add the following line (this will force ASP.NET to emit few init scripts) - normally not required, when any control on the page calls this method:
Page.GetPostBackEventReference(this);
Also, download the latest version of FlyTreeView:
http://www.9rays.net/download.aspx?productFamily=TreeView_ASP.NET_2
It contains the FlyTreeView.ForceAjaxRenderer property that you need to set to true.
We've introduced this setting for cases like yours - when it is not possible for treeview to determine that it is rendered in an AJAX context.
Also, at AjaxLoad function, comment out the lines:
// var treeview = CFlyTreeView.getInstanceById('FlyTreeView1');
// alert("The instance of FlyTreeView1 is " + treeview);
CFlyTreeView is not available at this stage, instead, Initialize function is automatically called by treeview.