Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在展开 asp:treeView 如何获取已花费的索引?
我试图调查: ontreenodeexpanded="Node_Expand" 但我找不到被点击的父根的索引。
谢谢,
您展开的节点是事件参数的 Node 属性:
// Inside the event handler method TreeNode clickedNode = e.Node;
您可以使用存储节点的TreeNodeCollection的IndexOf方法获取其索引。