结合数据库获得父节点和子节点信息数值:
.aspx代码如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TreeView控件.aspx.cs" Inherits="TreeView控件" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.fl{ float:left;}
.fr{ float:right;}
.clr{ clear:both;}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<div id="div_treeview" class="fl">
<%=DateTime.Now.ToLongTimeString() %>
<asp:TreeView ID="TreeView1" runat="server" ExpandDe