<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!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">
        .style1
        {
            font-family: 华文细黑;
            font-weight: bold;
            font-size: xx-large;
            color: #008000;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="width: 500px;" align="center">
            <tr>
                <td align="center">
                    <span class="style1">利用复选框动态删除数据记录</span>
                    <br />
                </td>
            </tr>
            <tr>
                <td align="center" >
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                        BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" 
                        CellPadding="2" ForeColor="Black" GridLines="None" Height="148px" Width="491px">
                        <FooterStyle BackColor="Tan" />
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:CheckBox ID="CheckBox1" runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="仓库号" HeaderText="仓库号" />
                            <asp:BoundField DataField="城市" HeaderText="城市" />
                            <asp:BoundField DataField="面积" HeaderText="面积" />
                            <asp:BoundField DataField="创建时间" HeaderText="创建时间" />
                        </Columns>
                        <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" 
                            HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
                        <HeaderStyle BackColor="Tan" Font-Bold="True" />
                        <AlternatingRowStyle BackColor="PaleGoldenrod" />
                    </asp:GridView>
                    &nbsp;
                </td>
            </tr>
            <tr >
                <td align="center" >
                    <asp:CheckBox ID="CheckBox2" runat="server" AutoPostBack="True" 
                        oncheckedchanged="CheckBox2_CheckedChanged" Text=" 全选" />
                    &nbsp;&nbsp;
                    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text=" 删 除 " />
&nbsp;&nbsp;
                    <asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text=" 取 消 " />
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
