标题:How to pop up different text base on the selected TreeNode?
只看楼主
vincent90152
Rank: 1
等 级:新手上路
帖 子:32
专家分:0
注 册:2007-7-24
 问题点数:0 回复次数:2 
How to pop up different text base on the selected TreeNode?
How to pop up different text base on the selected TreeNode?
I want to pop up different Text base on the selected TreeNode of the TreeView component. So, I create a TreeView and a ModalPopupExtender. Following is my codes.

Default.aspx
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:TreeView ID="TreeView1" runat="server" OnSelectedNodeChanged="TreeView1_SelectedNodeChanged">
<Nodes>
<asp:TreeNode Text="New Node" Value="New Node"></asp:TreeNode>
<asp:TreeNode Text="New Node" Value="New Node"></asp:TreeNode>
</Nodes>
</asp:TreeView>
<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="TreeView1"
PopupControlID="Panel1">
</cc1:ModalPopupExtender>
<asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px">
&nbsp;
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label></asp:Panel>

Default.aspx.cs
protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
{
this.Label1.Text = this.TreeView1.SelectedNode.Value.ToString();
}

When I click the TreeView component, the panel is pop up, but the text of label in the panel is not change. Does anyone know why, and how to solve this problem?

[此贴子已经被作者于2007-10-26 8:50:37编辑过]

搜索更多相关主题的帖子: base pop selected TreeNode different 
2007-10-25 18:06
jxnuwy04
Rank: 2
等 级:新手上路
威 望:4
帖 子:768
专家分:0
注 册:2006-9-15
得分:0 
英文太菜了,虽然认识几个单词,但是放在一起就不怎么认识了.

------------------不为别的,就为你,我的理想!-----------------
2007-10-26 09:50
vincent90152
Rank: 1
等 级:新手上路
帖 子:32
专家分:0
注 册:2007-7-24
得分:0 
谢谢您的回应
2007-10-26 17:28



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-180758-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.745717 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved