var node=TreeView1.getTreeNode(TreeView1.clickedNodeIndex);
node.setAttribute("Expanded","False");http://expert.csdn.net/Expert/topic/1525/1525202.xml

解决方案 »

  1.   

    你直接把树的属性中SelectExpands的值改成true就好了
      

  2.   

    我装了vs.net之后,但是我在开发asp.net程序时,不能使用treeview服务器端的控件
    在编译时总是出现这样的错误
    Parser Error Message: File or assembly name Microsoft.Web.UI.WebControls, or one of its dependencies, was not found.<%@ Register TagPrefix="mytree" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>请问哪位高手能给我指点一下。非常感谢!