但是删除的问题始终没有解决,这次做留言本 http://thcjp.cnblogs.com/archive/2006/06/26/435962.html
我实在想不到好办法来维护广告控件使用的那个XML文件,所以想到使用对DataSet操作以达到操作XML文件的目的,具体如下!!
后台CS代码
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml;
using System.Xml.XPath;
public partial class admin_ad : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
fill();
}
protected void fill()
{
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath("..\\App_Data\\ad.xml"));
DataList1.DataSource=ds.Tables[0].DefaultView;
DataList1.DataBind();
Session["dst"] = ds;
}
protected void DataList1_CancelCommand(object source, DataListCommandEventArgs e)
{//取消
DataList1.EditItemIndex = -1;
fill();
}
protected void DataList1_DeleteCommand(object source, DataListCommandEventArgs e)
{//删除事件
DataSet ds = (DataSet)Session["dst"];
ds.Tables[0].Rows.Remove(ds.Tables[0].Rows[e.Item.ItemIndex]);//删除了,我晕,太简单了撒!
Session["dst"] = ds;
ds.WriteXml(Server.MapPath("..\\App_Data\\ad.xml"));
fill();
}
protected void DataList1_EditCommand(object source, DataListCommandEventArgs e)
{
DataList1.EditItemIndex = e.Item.ItemIndex;
fill();
}
protected void DataList1_UpdateCommand(object source, DataListCommandEventArgs e)
{//修改广告,因为我对XML类的操作确实还不熟练,所以就使用DataSet,反正结果是一样
DataSet ds = (DataSet)Session["dst"];
ds.Tables[0].Rows[e.Item.ItemIndex]["ImageUrl"] = ((TextBox)e.Item.FindControl("TextBox2")).Text.ToString();
ds.Tables[0].Rows[e.Item.ItemIndex]["NavigateUrl"] = ((TextBox)e.Item.FindControl("TextBox5")).Text.ToString();
ds.Tables[0].Rows[e.Item.ItemIndex]["AlternateText"] = ((TextBox)e.Item.FindControl("TextBox1")).Text.ToString();
ds.Tables[0].Rows[e.Item.ItemIndex]["Keyword"] = ((TextBox)e.Item.FindControl("TextBox3")).Text.ToString();
ds.Tables[0].Rows[e.Item.ItemIndex]["Impressions"] = ((TextBox)e.Item.FindControl("TextBox4")).Text.ToString();
Session["dst"] = ds;
ds.WriteXml(Server.MapPath("..\\App_Data\\ad.xml"));
DataList1.EditItemIndex = -1;
fill();
}
protected void Button5_Click(object sender, EventArgs e)
{//新增广告
DataSet ds = (DataSet)Session["dst"];
DataRow dr = ds.Tables[0].NewRow();
dr["ImageUrl"] = url.Text.ToString();
dr["NavigateUrl"] = ng.Text.ToString();
dr["AlternateText"] = na.Text.ToString();
dr["Keyword"] = kw.Text.ToString();
dr["Impressions"] = qz.Text.ToString();
ds.Tables[0].Rows.Add(dr);
Session["dst"] = ds;
ds.WriteXml(Server.MapPath("..\\App_Data\\ad.xml"));
fill();
}
protected void LinkButton1_Click(object sender, EventArgs e)
{//上传图片第一步
DIV1.Visible = true;
}
protected void Button6_Click(object sender, EventArgs e)
{//上传图片第二步
string name = fu.FileName.ToString();//得到文件名字
int cut = Convert.ToInt32(fu.PostedFile.ContentLength);//文件大小
string typ = fu.PostedFile.ContentType.ToString();
string typp = typ.Substring(0,5);
if (typp == "image")
{
if (cut < Convert.ToInt32(odb.scr("Select adcut from config")))
{
fu.PostedFile.SaveAs(Server.MapPath("../images/") + "\\" + name);
img.ImageUrl = (Server.MapPath("../images/") + "\\" + name);
url.Text = (Server.MapPath("../images/") + "\\" + name);
}
else
{
url.Text = "只是个广告,图片有必要那么大吗?";
}
}
else
{
url.Text = "不被允许的类型";
}
}
}
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml;
using System.Xml.XPath;
public partial class admin_ad : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
fill();
}
protected void fill()
{
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath("..\\App_Data\\ad.xml"));
DataList1.DataSource=ds.Tables[0].DefaultView;
DataList1.DataBind();
Session["dst"] = ds;
}
protected void DataList1_CancelCommand(object source, DataListCommandEventArgs e)
{//取消
DataList1.EditItemIndex = -1;
fill();
}
protected void DataList1_DeleteCommand(object source, DataListCommandEventArgs e)
{//删除事件
DataSet ds = (DataSet)Session["dst"];
ds.Tables[0].Rows.Remove(ds.Tables[0].Rows[e.Item.ItemIndex]);//删除了,我晕,太简单了撒!
Session["dst"] = ds;
ds.WriteXml(Server.MapPath("..\\App_Data\\ad.xml"));
fill();
}
protected void DataList1_EditCommand(object source, DataListCommandEventArgs e)
{
DataList1.EditItemIndex = e.Item.ItemIndex;
fill();
}
protected void DataList1_UpdateCommand(object source, DataListCommandEventArgs e)
{//修改广告,因为我对XML类的操作确实还不熟练,所以就使用DataSet,反正结果是一样
DataSet ds = (DataSet)Session["dst"];
ds.Tables[0].Rows[e.Item.ItemIndex]["ImageUrl"] = ((TextBox)e.Item.FindControl("TextBox2")).Text.ToString();
ds.Tables[0].Rows[e.Item.ItemIndex]["NavigateUrl"] = ((TextBox)e.Item.FindControl("TextBox5")).Text.ToString();
ds.Tables[0].Rows[e.Item.ItemIndex]["AlternateText"] = ((TextBox)e.Item.FindControl("TextBox1")).Text.ToString();
ds.Tables[0].Rows[e.Item.ItemIndex]["Keyword"] = ((TextBox)e.Item.FindControl("TextBox3")).Text.ToString();
ds.Tables[0].Rows[e.Item.ItemIndex]["Impressions"] = ((TextBox)e.Item.FindControl("TextBox4")).Text.ToString();
Session["dst"] = ds;
ds.WriteXml(Server.MapPath("..\\App_Data\\ad.xml"));
DataList1.EditItemIndex = -1;
fill();
}
protected void Button5_Click(object sender, EventArgs e)
{//新增广告
DataSet ds = (DataSet)Session["dst"];
DataRow dr = ds.Tables[0].NewRow();
dr["ImageUrl"] = url.Text.ToString();
dr["NavigateUrl"] = ng.Text.ToString();
dr["AlternateText"] = na.Text.ToString();
dr["Keyword"] = kw.Text.ToString();
dr["Impressions"] = qz.Text.ToString();
ds.Tables[0].Rows.Add(dr);
Session["dst"] = ds;
ds.WriteXml(Server.MapPath("..\\App_Data\\ad.xml"));
fill();
}
protected void LinkButton1_Click(object sender, EventArgs e)
{//上传图片第一步
DIV1.Visible = true;
}
protected void Button6_Click(object sender, EventArgs e)
{//上传图片第二步
string name = fu.FileName.ToString();//得到文件名字
int cut = Convert.ToInt32(fu.PostedFile.ContentLength);//文件大小
string typ = fu.PostedFile.ContentType.ToString();
string typp = typ.Substring(0,5);
if (typp == "image")
{
if (cut < Convert.ToInt32(odb.scr("Select adcut from config")))
{
fu.PostedFile.SaveAs(Server.MapPath("../images/") + "\\" + name);
img.ImageUrl = (Server.MapPath("../images/") + "\\" + name);
url.Text = (Server.MapPath("../images/") + "\\" + name);
}
else
{
url.Text = "只是个广告,图片有必要那么大吗?";
}
}
else
{
url.Text = "不被允许的类型";
}
}
}
前台HTML代码
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ad.aspx.cs" Inherits="admin_ad" %>
<!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>
<link href="../images/news.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DataList ID="DataList1" runat="server" CellPadding="4" ForeColor="#333333" OnCancelCommand="DataList1_CancelCommand" OnDeleteCommand="DataList1_DeleteCommand" OnEditCommand="DataList1_EditCommand" OnUpdateCommand="DataList1_UpdateCommand">
<ItemTemplate>
<table width="500">
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
广告名称</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed; background-color: #99ccff;" colspan="2">
<asp:Label ID="Label1" runat="server" Text='<%# Eval("AlternateText") %>'></asp:Label></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
图片地址</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed; background-color: #99ccff;" colspan="2">
<asp:Label ID="Label2" runat="server" Text='<%# Eval("ImageUrl") %>'></asp:Label></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
关键词</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed; background-color: #99ccff;" colspan="2">
<asp:Label ID="Label3" runat="server" Text='<%# Eval("Keyword") %>'></asp:Label></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
显示权重</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed; background-color: #99ccff;" colspan="2">
<asp:Label ID="Label4" runat="server" Text='<%# Eval("Impressions") %>'></asp:Label></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed; height: 22px">
广告指向</td>
<td colspan="2" style=" 400px; border-bottom: #0099ff 1px dashed; height: 22px;
background-color: #99ccff">
<a href='<%# Eval("NavigateUrl") %>' target=_blank><asp:Label ID="Label5" runat="server" Text='<%# Eval("NavigateUrl") %>'></asp:Label></a></td>
</tr>
<tr>
<td align="center" colspan="3" style="border-bottom: #0099ff 1px dashed; height: 27px;
background-color: #99ccff">
<asp:Button ID="Button1" runat="server" CommandName="edit" Text="修改广告" />
<asp:Button ID="Button2" runat="server" CommandName="delete" Text="删除广告" /></td>
</tr>
</table>
</ItemTemplate>
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<AlternatingItemStyle BackColor="White" />
<ItemStyle BackColor="#EFF3FB" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditItemTemplate>
<table width="500">
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
广告名称</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed; background-color: #99ccff;" colspan="2">
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("AlternateText") %>'></asp:TextBox></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
图片地址</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed; background-color: #99ccff;" colspan="2">
<asp:TextBox ID="TextBox2" runat="server" Text='<%# Eval("ImageUrl") %>'></asp:TextBox></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
关键词</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed; background-color: #99ccff;" colspan="2">
<asp:TextBox ID="TextBox3" runat="server" Text='<%# Eval("Keyword") %>'></asp:TextBox></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed; height: 27px;">
显示权重</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed; background-color: #99ccff; height: 27px;" colspan="2">
<asp:TextBox ID="TextBox4" runat="server" Text='<%# Eval("Impressions") %>'></asp:TextBox></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed; height: 27px">
广告指向</td>
<td colspan="2" style=" 400px; border-bottom: #0099ff 1px dashed; height: 27px;
background-color: #99ccff">
<asp:TextBox ID="TextBox5" runat="server" Text='<%# Eval("NavigateUrl") %>'></asp:TextBox></td>
</tr>
<tr>
<td align="center" colspan="3" style="border-bottom: #0099ff 1px dashed; background-color: #99ccff">
<asp:Button ID="Button3" runat="server" CommandName="update" Text="更新" />
<asp:Button ID="Button4" runat="server" CommandName="cancel" Text="取消" /></td>
</tr>
</table>
</EditItemTemplate>
</asp:DataList> <table width="500">
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
广告名称</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed;" colspan="2">
<asp:TextBox ID="na" runat="server" Text='<%# Eval("AlternateText") %>'></asp:TextBox></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
图片地址</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed;" colspan="2">
<asp:TextBox ID="url" runat="server" Text='<%# Eval("ImageUrl") %>'></asp:TextBox>
<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">上传图片</asp:LinkButton>
<div id="DIV1" runat="server" style=" 400px; height: 100px" visible="false">
<table style=" 400px; height: 100px">
<tr>
<td colspan="2" style="height: 55px">
<asp:Image ID="img" runat="server" Height="50px" Width="400px" /></td>
</tr>
<tr>
<td style="300px">
<asp:FileUpload ID="fu" runat="server" Width="287px" /></td>
<td style=" 100px">
<asp:Button ID="Button6" runat="server" OnClick="Button6_Click" Text="上传" /></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
关键词</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed;" colspan="2">
<asp:TextBox ID="kw" runat="server" Text='<%# Eval("Keyword") %>'></asp:TextBox></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed; height: 27px;">
显示权重</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed;" colspan="2">
<asp:TextBox ID="qz" runat="server" Text='<%# Eval("Impressions") %>'></asp:TextBox></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed; height: 27px">
广告指向</td>
<td colspan="2" style=" 400px; border-bottom: #0099ff 1px dashed">
<asp:TextBox ID="ng" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td align="center" colspan="3" style="border-bottom: #0099ff 1px dashed; background-color: #99ccff">
<asp:Button ID="Button5" runat="server" OnClick="Button5_Click" Text="增加" /></td>
</tr>
</table>
</div>
</form>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ad.aspx.cs" Inherits="admin_ad" %>
<!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>
<link href="../images/news.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DataList ID="DataList1" runat="server" CellPadding="4" ForeColor="#333333" OnCancelCommand="DataList1_CancelCommand" OnDeleteCommand="DataList1_DeleteCommand" OnEditCommand="DataList1_EditCommand" OnUpdateCommand="DataList1_UpdateCommand">
<ItemTemplate>
<table width="500">
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
广告名称</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed; background-color: #99ccff;" colspan="2">
<asp:Label ID="Label1" runat="server" Text='<%# Eval("AlternateText") %>'></asp:Label></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
图片地址</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed; background-color: #99ccff;" colspan="2">
<asp:Label ID="Label2" runat="server" Text='<%# Eval("ImageUrl") %>'></asp:Label></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
关键词</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed; background-color: #99ccff;" colspan="2">
<asp:Label ID="Label3" runat="server" Text='<%# Eval("Keyword") %>'></asp:Label></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
显示权重</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed; background-color: #99ccff;" colspan="2">
<asp:Label ID="Label4" runat="server" Text='<%# Eval("Impressions") %>'></asp:Label></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed; height: 22px">
广告指向</td>
<td colspan="2" style=" 400px; border-bottom: #0099ff 1px dashed; height: 22px;
background-color: #99ccff">
<a href='<%# Eval("NavigateUrl") %>' target=_blank><asp:Label ID="Label5" runat="server" Text='<%# Eval("NavigateUrl") %>'></asp:Label></a></td>
</tr>
<tr>
<td align="center" colspan="3" style="border-bottom: #0099ff 1px dashed; height: 27px;
background-color: #99ccff">
<asp:Button ID="Button1" runat="server" CommandName="edit" Text="修改广告" />
<asp:Button ID="Button2" runat="server" CommandName="delete" Text="删除广告" /></td>
</tr>
</table>
</ItemTemplate>
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<AlternatingItemStyle BackColor="White" />
<ItemStyle BackColor="#EFF3FB" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditItemTemplate>
<table width="500">
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
广告名称</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed; background-color: #99ccff;" colspan="2">
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("AlternateText") %>'></asp:TextBox></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
图片地址</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed; background-color: #99ccff;" colspan="2">
<asp:TextBox ID="TextBox2" runat="server" Text='<%# Eval("ImageUrl") %>'></asp:TextBox></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
关键词</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed; background-color: #99ccff;" colspan="2">
<asp:TextBox ID="TextBox3" runat="server" Text='<%# Eval("Keyword") %>'></asp:TextBox></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed; height: 27px;">
显示权重</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed; background-color: #99ccff; height: 27px;" colspan="2">
<asp:TextBox ID="TextBox4" runat="server" Text='<%# Eval("Impressions") %>'></asp:TextBox></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed; height: 27px">
广告指向</td>
<td colspan="2" style=" 400px; border-bottom: #0099ff 1px dashed; height: 27px;
background-color: #99ccff">
<asp:TextBox ID="TextBox5" runat="server" Text='<%# Eval("NavigateUrl") %>'></asp:TextBox></td>
</tr>
<tr>
<td align="center" colspan="3" style="border-bottom: #0099ff 1px dashed; background-color: #99ccff">
<asp:Button ID="Button3" runat="server" CommandName="update" Text="更新" />
<asp:Button ID="Button4" runat="server" CommandName="cancel" Text="取消" /></td>
</tr>
</table>
</EditItemTemplate>
</asp:DataList> <table width="500">
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
广告名称</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed;" colspan="2">
<asp:TextBox ID="na" runat="server" Text='<%# Eval("AlternateText") %>'></asp:TextBox></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
图片地址</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed;" colspan="2">
<asp:TextBox ID="url" runat="server" Text='<%# Eval("ImageUrl") %>'></asp:TextBox>
<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">上传图片</asp:LinkButton>
<div id="DIV1" runat="server" style=" 400px; height: 100px" visible="false">
<table style=" 400px; height: 100px">
<tr>
<td colspan="2" style="height: 55px">
<asp:Image ID="img" runat="server" Height="50px" Width="400px" /></td>
</tr>
<tr>
<td style="300px">
<asp:FileUpload ID="fu" runat="server" Width="287px" /></td>
<td style=" 100px">
<asp:Button ID="Button6" runat="server" OnClick="Button6_Click" Text="上传" /></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed;">
关键词</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed;" colspan="2">
<asp:TextBox ID="kw" runat="server" Text='<%# Eval("Keyword") %>'></asp:TextBox></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed; height: 27px;">
显示权重</td>
<td style=" 400px; border-bottom: #0099ff 1px dashed;" colspan="2">
<asp:TextBox ID="qz" runat="server" Text='<%# Eval("Impressions") %>'></asp:TextBox></td>
</tr>
<tr>
<td style=" 100px; border-bottom: #0099ff 1px dashed; height: 27px">
广告指向</td>
<td colspan="2" style=" 400px; border-bottom: #0099ff 1px dashed">
<asp:TextBox ID="ng" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td align="center" colspan="3" style="border-bottom: #0099ff 1px dashed; background-color: #99ccff">
<asp:Button ID="Button5" runat="server" OnClick="Button5_Click" Text="增加" /></td>
</tr>
</table>
</div>
</form>
</body>
</html>