前台代码和效果图:
<body>
<form id="form1" runat="server">
<table border="1" cellpadding="0" cellspacing="0" style="text-align: center;" width="100%"
bgcolor="#d4ddee">
<tr>
<td>
<table style=" width:100%;">
<tr>
<td style=" width:30%; height: 500px;" align="left" valign="top">
<asp:TreeView ID="tv_type" runat="server" ShowLines="True"
onselectednodechanged="tv_type_SelectedNodeChanged">
<SelectedNodeStyle BackColor="#69A1DA" />
</asp:TreeView></td>
<td style=" width:70%; height: 500px;" align="left" valign="top">
<table width="100%" style="line-height: 35px">
<tr><td colspan="2" align="right">
<asp:Label ID="lblvalue" runat="server" Visible="False"></asp:Label>
<asp:Label ID="lbltype" runat="server" Visible="False"></asp:Label>
<asp:Button ID="BtnAdd" runat="server" Text="添 加"
OnClick="BtnAdd_Click" CssClass="sub_bg" />
<asp:Button ID="Btnupdate" runat="server" Text="修 改"
OnClick="Btnupdate_Click" CssClass="sub_bg" Enabled="False" />
<asp:Button ID="Btnsave" runat="server" Text="保 存"
OnClick="Btnsave_Click" CssClass="sub_bg" Enabled="False" />
<asp:Button ID="Btndelete" runat="server" Text="删 除"
OnClick="Btndelete_Click" CssClass="sub_bg" Enabled="False" />
<asp:Button ID=