确定ASP TreeView节点的值路径? [英] Identifying the asp treeview node value path?

查看:55
本文介绍了确定ASP TreeView节点的值路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

海,

在我的应用程序中,我有两个名为Treeview1,Treeview2的ASP Treeview控件和四个名为
的按钮 添加,删除,添加,删除.

在第一个树视图中,我选择了一个树节点并单击添加按钮,然后它将成功添加到第二个树视图中.如果我再次添加该节点,它将再次添加到Second treeview,如何防止这种情况,
我写了以下的

Hai,

In my app i have two asp treeview controls named Treeview1, Treeview2, and four buttons named
ADD, REMOVE,ADDALL, REMOVEALL.

In the first Treeview I selected a treenode and clicked ADD button then it will added to the second treeview successfullly. if I add again that node, again it will be added to Second treeview, How I can prevent this,
I wrote the following one

TreeNode node = TreeView2.FindNode(TreeView1.SelectedNode.ValuePath);

if (node != null)
           
   {
   Response.wripte("This node is already exists");
            return;
}


但不能确定所有情况,
如果您知道可以帮助我


but not identify for all cases,
if u know help me

推荐答案

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.treeview.findnode.aspx [
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.treenode.valuepath.aspx[^]

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.treeview.findnode.aspx[^]

I hope the above information will be helpful. If you have more concerns, please let me know.


这篇关于确定ASP TreeView节点的值路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆