| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 814 人关注过本帖
标题: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
快速回复:How to pop up different text base on the selected TreeNode?
数据加载中...
 
   



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

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