<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" ValidateRequest="false"
    CodeBehind="Announce.aspx.cs" Inherits="Aspx1.Admin.Announce" Title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="tableBorder" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <th colspan="3" class="ym12_bti">
                网站公告管理
            </th>
        </tr>
        <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
            <HeaderTemplate>
                <tr style="text-align: center;">
                    <td width="200" class="td2">
                        公告标题
                    </td>
                    <td width="300" class="td2">
                        公告内容
                    </td>
                  
                    <td class="td2" style="text-align: left">
                        相关操作
                    </td>
                </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr style="text-align: center;">
                    <td class="td1">
                        <%#Eval("title") %>
                        <input id="Hidden1" type="hidden" runat="server" value='<%#Eval("ID") %>' />
                    </td>
                    <td class="td1">
                       
                            <%#Eval("content")%>
                    </td>
                   
                    <td class="td1" style="text-align: left">
                        <asp:LinkButton ID="LinkButton1" CommandArgument="0" runat="server" CausesValidation="false">修改</asp:LinkButton>
                        &nbsp;
                        <asp:LinkButton ID="LinkButton2" CommandArgument="1" runat="server" CausesValidation="false"
                            OnClientClick="return confirm('您将删除这个公告!!?删除后不可恢复');">删除</asp:LinkButton>
                    </td>
                </tr>
                <tr>
                    <td colspan="3" class="td1" style="padding-left: 100px;">
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                <tr style="text-align: center;">
                    <td colspan="3" class="td1" style="text-align: right; padding-left: 10px;">
                        <asp:LinkButton ID="LinkButton1" CommandArgument="2" runat="server" CausesValidation="false"
                            Font-Bold="true">添加网站公告</asp:LinkButton>
                    </td>
                </tr>
            </FooterTemplate>
        </asp:Repeater>
        <tr style="text-align: center;" runat="server" visible="false" id="trAdd">
            <td class="td1">
                <asp:TextBox ID="txtTitle" ForeColor=" #999" runat="server" onfocus="if(this.value=='公告标题')this.value='';"
                    Text="公告标题" Width="254px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" Display="Dynamic"
                    ErrorMessage="不能为空！" ControlToValidate="txtTitle"></asp:RequiredFieldValidator>
            </td>
            <td class="td1">
                <asp:TextBox ID="txtContent" ForeColor=" #999" runat="server" onfocus="if(this.value=='公告内容')this.value='';"
                    Text="公告内容" Height="68px" TextMode="MultiLine" Width="295px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="Dynamic"
                    ErrorMessage="不能为空！" ControlToValidate="txtContent"></asp:RequiredFieldValidator>
            </td>
            
            <td class="td1" style="text-align: left">
                <asp:Button ID="Button1" runat="server" Text=" 添 加 " OnClick="Button1_Click" />
              
            </td>
        </tr>
        <tr style="text-align: center;" runat="server" visible="false" id="trEdit">
            <td class="td1"> <input id="Hidden1" type="hidden" runat="server" value='<%#Eval("ID") %>' />
                <asp:TextBox ID="txtTitle2" ForeColor=" #999" runat="server" onfocus="if(this.value=='公告标题')this.value='';"
                    Text="公告标题" Width="254px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" Display="Dynamic"
                    ErrorMessage="不能为空！" ControlToValidate="txtTitle2"></asp:RequiredFieldValidator>
            </td>
            <td class="td1">
                <asp:TextBox ID="txtContent2" ForeColor=" #999" runat="server" onfocus="if(this.value=='公告内容')this.value='';"
                    Text="公告内容" Height="68px" TextMode="MultiLine" Width="283px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" Display="Dynamic"
                    ErrorMessage="不能为空！" ControlToValidate="txtContent2"></asp:RequiredFieldValidator>
            </td>
            
            <td class="td1" style="text-align: left">
                <asp:Button ID="Button2" runat="server" Text=" 修 改 " OnClick="Button2_Click" />
               
            </td>
        </tr>
    </table>
</asp:Content>
