简体   繁体   English

TreeView控件ASP.net

[英]TreeView Control ASP.net

I have a treeview control on an asp page. 我在ASP页面上有一个Treeview控件。 Everytime I select a node, be it root node or child node, the entire tree is displayed again under the tree. 每当我选择一个节点时,无论是根节点还是子节点,整个树都将再次显示在树下。 If I go on selecting nodes on the tree, no matter which one I select, a duplicate tree is displayed under it. 如果我继续选择树上的节点,则无论选择哪一个节点,其下都会显示一棵重复的树。 I have written no events so far. 到目前为止,我还没有写任何事件。 It is some property that I am missing out on. 这是我缺少的一些财产。 Please help! 请帮忙!

Is this tree being created on page load by any chance? 是否会在页面加载时创建此树? If so, test (! isPostback ) on PageLoad in code behind before creating it. 如果是这样, isPostbackPageLoad后面的代码中测试(! isPostback ),然后再创建它。 If not, then you need to provide more code. 如果没有,那么您需要提供更多代码。 Include details of event handlers for the control etc. 包括控件等事件处理程序的详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM