asp.NET2.0 的TreeView控件
2006-03-10 13:43
267 查看
<%@ Page Language="C#" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>TreeView w/ Line Images</title>
</head>
<body>
<div>
<h2>TreeView w/ Line Images</h2>
<form action="treeview04_lines_cs.aspx" runat="server">
<asp:TreeView ID="TreeView"
RootNodeStyle-ImageUrl="~/images/xp/computer.gif"
ParentNodeStyle-ImageUrl="~/images/xp/folder.gif"
LeafNodeStyle-ImageUrl="~/images/xp/ie.gif"
LineImagesFolder="~/images/lines"
ShowLines="true"
runat="server">
<NodeStyle Font-Names="Arial" Font-Size="8pt" ForeColor="DarkBlue" HorizontalPadding="5"/>
<RootNodeStyle Font-Bold="True" Font-Size="9pt"/>
<HoverNodeStyle Font-Underline="True"/>
<Nodes>
<asp:TreeNode Text="My Computer">
<asp:TreeNode Text="Favorites" ImageUrl="~/images/xp/star.gif">
<asp:TreeNode Text="News">
<asp:TreeNode Text="MSN" NavigateUrl="http://www.msn.com"/>
<asp:TreeNode Text="MSNBC News" NavigateUrl="http://www.msnbc.msn.com"/>
</asp:TreeNode>
<asp:TreeNode Text="Technology">
<asp:TreeNode Text="Microsoft" NavigateUrl="http://www.microsoft.com"/>
<asp:TreeNode Text="ASP.NET" NavigateUrl="http://www.asp.net"/>
<asp:TreeNode Text="GotDotNet" NavigateUrl="http://www.gotdotnet.com"/>
<asp:TreeNode Text="MSDN" NavigateUrl="http://msdn.microsoft.com"/>
</asp:TreeNode>
<asp:TreeNode Text="Shopping">
<asp:TreeNode Text="MSN Shopping" NavigateUrl="http://shopping.msn.com"/>
<asp:TreeNode Text="MSN Autos" NavigateUrl="http://autos.msn.com"/>
</asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="City Links">
<asp:TreeNode Text="MapPoint" NavigateUrl="http://www.mappoint.com"/>
<asp:TreeNode Text="MSN City Guides" NavigateUrl="http://local.msn.com"/>
</asp:TreeNode>
<asp:TreeNode Text="Music Links">
<asp:TreeNode Text="MSN Music" NavigateUrl="http://music.msn.com"/>
</asp:TreeNode>
</asp:TreeNode>
</Nodes>
</asp:TreeView>
</form>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>TreeView w/ Line Images</title>
</head>
<body>
<div>
<h2>TreeView w/ Line Images</h2>
<form action="treeview04_lines_cs.aspx" runat="server">
<asp:TreeView ID="TreeView"
RootNodeStyle-ImageUrl="~/images/xp/computer.gif"
ParentNodeStyle-ImageUrl="~/images/xp/folder.gif"
LeafNodeStyle-ImageUrl="~/images/xp/ie.gif"
LineImagesFolder="~/images/lines"
ShowLines="true"
runat="server">
<NodeStyle Font-Names="Arial" Font-Size="8pt" ForeColor="DarkBlue" HorizontalPadding="5"/>
<RootNodeStyle Font-Bold="True" Font-Size="9pt"/>
<HoverNodeStyle Font-Underline="True"/>
<Nodes>
<asp:TreeNode Text="My Computer">
<asp:TreeNode Text="Favorites" ImageUrl="~/images/xp/star.gif">
<asp:TreeNode Text="News">
<asp:TreeNode Text="MSN" NavigateUrl="http://www.msn.com"/>
<asp:TreeNode Text="MSNBC News" NavigateUrl="http://www.msnbc.msn.com"/>
</asp:TreeNode>
<asp:TreeNode Text="Technology">
<asp:TreeNode Text="Microsoft" NavigateUrl="http://www.microsoft.com"/>
<asp:TreeNode Text="ASP.NET" NavigateUrl="http://www.asp.net"/>
<asp:TreeNode Text="GotDotNet" NavigateUrl="http://www.gotdotnet.com"/>
<asp:TreeNode Text="MSDN" NavigateUrl="http://msdn.microsoft.com"/>
</asp:TreeNode>
<asp:TreeNode Text="Shopping">
<asp:TreeNode Text="MSN Shopping" NavigateUrl="http://shopping.msn.com"/>
<asp:TreeNode Text="MSN Autos" NavigateUrl="http://autos.msn.com"/>
</asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="City Links">
<asp:TreeNode Text="MapPoint" NavigateUrl="http://www.mappoint.com"/>
<asp:TreeNode Text="MSN City Guides" NavigateUrl="http://local.msn.com"/>
</asp:TreeNode>
<asp:TreeNode Text="Music Links">
<asp:TreeNode Text="MSN Music" NavigateUrl="http://music.msn.com"/>
</asp:TreeNode>
</asp:TreeNode>
</Nodes>
</asp:TreeView>
</form>
</div>
</body>
</html>
相关文章推荐
- 使用ASP.NET2.0的TreeView控件显示分层数据
- 我个人认为这个不错------使用ASP.NET2.0的TreeView控件显示分层数据
- 使用ASP.NET2.0的TreeView控件显示分层数据
- ASP.NET2.0 TreeView控件使用数据库生成目录
- 使用ASP.NET2.0的TreeView控件显示分层数据
- Asp.net2.0部署时TreeView控件无法正常显示没有图片的问题
- asp.net2.0控件treeview绑定数据以及全选操作
- 关于asp.net2.0的导航控件treeview和menu
- ASP.Net2.0 TreeView 控件的 bug?
- ASP.NET2.0 新控件 TreeView控件的属性和事件
- Asp.net2.0部署时TreeView控件无法正常显示没有图片的问题
- asp.net2.0部署網站時 出現對treeview 控件不支持問題(关于IIS与axd)
- ASP.NET2.0服务器控件之捕获回传事件
- ASP.NET 1.1中TreeView控件使用小结
- TreeView IE Web 控件的使用(很直观)
- ajax.net中与server控件的交互使用(二)(asp.net2.0)
- c# winform项目treeview控件绑定本地电脑磁盘信息,读取文件夹信息,显示文件夹内文件内容
- 最近要拿下treeview的第三方控件
- 使用 TreeView IE Web 控件
- asp.net2.0安全性(Login系列控件)