TreeView简单使用
2005-09-03 12:15
393 查看
学了这么久的.NET了,还没有用过TREEVIEW控件,今天就下了IEWEBCONTROL学了学怎么用TREEVIEW,
写了个简单的二级树.
create table tree
(
id int identity(1,1) primary key,
childID int default 0,--这里定义时写错了,应该用parentID
title varchar(50) not null,
url varchar(100)
)
insert into tree (childID,title,url) values (2,'节点1','http://www.163.com')
insert into tree (childID,title,url) values (0,'节点2','http://www.163.com')
insert into tree (childID,title,url) values (2,'节点3','http://www.163.com')
insert into tree (childID,title,url) values (9,'节点4','http://www.163.com')
insert into tree (childID,title,url) values (2,'节点5','http://www.163.com')
insert into tree (childID,title,url) values (2,'节点6','http://www.163.com')
insert into tree (childID,title,url) values (9,'节点7','http://www.163.com')
insert into tree (childID,title,url) values (9,'节点8','http://www.163.com')
insert into tree (childID,title,url) values (0,'节点9','http://www.163.com')下面是ASP.CS文件
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using Microsoft.Web.UI.WebControls;
namespace xmlDemo
写了个简单的二级树.
create table tree
(
id int identity(1,1) primary key,
childID int default 0,--这里定义时写错了,应该用parentID
title varchar(50) not null,
url varchar(100)
)
insert into tree (childID,title,url) values (2,'节点1','http://www.163.com')
insert into tree (childID,title,url) values (0,'节点2','http://www.163.com')
insert into tree (childID,title,url) values (2,'节点3','http://www.163.com')
insert into tree (childID,title,url) values (9,'节点4','http://www.163.com')
insert into tree (childID,title,url) values (2,'节点5','http://www.163.com')
insert into tree (childID,title,url) values (2,'节点6','http://www.163.com')
insert into tree (childID,title,url) values (9,'节点7','http://www.163.com')
insert into tree (childID,title,url) values (9,'节点8','http://www.163.com')
insert into tree (childID,title,url) values (0,'节点9','http://www.163.com')下面是ASP.CS文件
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using Microsoft.Web.UI.WebControls;
namespace xmlDemo
相关文章推荐
- delphi TREEVIEW的简单使用
- delphi TREEVIEW的简单使用
- 关于使用TreeView 控件的简单介绍
- vs2005的treeview简单使用之无限级别菜单建立
- delphi TREEVIEW的简单使用
- winform中treeView的简单使用(连数据库和一些特殊要求)
- 解析XML,将数据显示在treeview上,使用简单工厂模式
- TreeView简单使用
- bootstrap-treeview简单使用
- 浅析BootStrap Treeview的简单使用
- jquery的treeview插件使用-简单介绍
- winform中treeView的简单使用
- WPF TreeView使用的简单案例
- 一个简单的MFC中TreeView使用
- treeview的简单使用
- TreeView的简单使用
- iOS RATreeView的简单使用(树状列表)
- hibernate HQL的简单使用一
- 简单几步使用zabbix监控Linux物理服务器CPU温度
- 【原】EF简单使用