<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewsDelete.aspx.cs" Inherits="WebApplication1.新闻删除" %>

<!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">
        #co { color:Black; text-align:center; }
        #location { text-align:center; }
    </style>
</head>
<body>
<form id="form1" runat="server">
<div id="location">
    <div>
        <h1 id="co">删除新闻</h1>
    </div>
    <div id="location">
        
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            CellPadding="2" DataSourceID="SqlDataSource1" 
            ForeColor="Black" GridLines="None" BackColor="LightGoldenrodYellow" 
            BorderColor="Tan" BorderWidth="1px">
            <FooterStyle BackColor="Tan" />
            <Columns>
                <asp:BoundField DataField="n_noticid" HeaderText="编号" InsertVisible="False" 
                    ReadOnly="True" SortExpression="n_noticid" />
                <asp:BoundField DataField="n_theme" HeaderText="主题" SortExpression="n_theme" />
                <asp:BoundField DataField="n_content" HeaderText="内容" 
                    SortExpression="n_content" />
                <asp:BoundField DataField="n_time" HeaderText="时间" SortExpression="n_time" />
                <asp:BoundField DataField="n_picture" HeaderText="图片" 
                    SortExpression="n_picture" />
                    <asp:TemplateField HeaderText="删除">
                    <ItemTemplate>
                        <asp:CheckBox ID="chk_id" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" 
                HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
            <HeaderStyle BackColor="Tan" Font-Bold="True" />
            <AlternatingRowStyle BackColor="PaleGoldenrod" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:studentConnectionString %>" 
            
            SelectCommand="SELECT [n_noticid], [n_theme], [n_time], [n_content], [n_picture] FROM [T_News]">
        </asp:SqlDataSource>
        
    </div>
    <div align="center">
        <asp:Button ID="Button1" runat="server" Text="删除" onclick="Button1_Click" 
            style="width: 40px; height: 26px;" />&nbsp;&nbsp;
    </div>
</div>
</body>
</form>
</html>
