<%@ Page Title="" Language="C#" MasterPageFile="~/Member/MemberMaster.Master" AutoEventWireup="true"
    CodeBehind="Favorite.aspx.cs" Inherits="TopWinCMS.WebUI.Member.Favorite" %>

<%@ Register Assembly="TopWinCMS.WebControls" Namespace="TopWinCMS.WebControls" TagPrefix="cc1" %>
<%@ Register Src="~/UserControl/UC_AjaxLoading.ascx" TagName="UC_AjaxLoading" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
        <ProgressTemplate>
            <uc1:UC_AjaxLoading ID="UC_AjaxLoading1" runat="server" />
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table width="100%" cellpadding="4" border="0">
                <tr>
                    <td>
                        标题：<asp:TextBox ID="TB_Title" runat="server" Width="288px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TB_Title"
                            ErrorMessage="请输入" ValidationGroup="add"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        网址：<asp:TextBox ID="TB_URL" runat="server" Width="350px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TB_URL"
                            ErrorMessage="请输入" ValidationGroup="add"></asp:RequiredFieldValidator>
                    </td>
                </tr>
            </table>
            <asp:Button ID="BT_Add" runat="server" Text="添加" CssClass="btn" OnClick="BT_Add_Click"
                ValidationGroup="add" />
            <asp:GridView ID="GV_List" runat="server" AutoGenerateColumns="False" Width="100%"
                OnRowDataBound="GV_List_RowDataBound" DataKeyNames="ID" OnRowDeleting="GV_List_RowDeleting"
                OnRowCancelingEdit="GV_List_RowCancelingEdit" OnRowEditing="GV_List_RowEditing"
                OnRowUpdating="GV_List_RowUpdating">
                <HeaderStyle BackColor="Black" ForeColor="White" />
                <Columns>
                    <asp:BoundField DataField="Title" HeaderText="标题">
                        <ItemStyle HorizontalAlign="Center" Width="150px" />
                        <HeaderStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="网址">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server" Width="98%" Text='<%# Bind("URL") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Bind("URL") %>' Target="_blank">访问</asp:HyperLink>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="LastVisit" HeaderText="最后访问" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}"
                        HtmlEncode="False" ReadOnly="True" Visible="False">
                        <ItemStyle Width="108px" />
                        <HeaderStyle Width="108px" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:CommandField ShowEditButton="True">
                        <HeaderStyle Width="60px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:CommandField>
                    <asp:CommandField ShowDeleteButton="true">
                        <HeaderStyle Width="60px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:CommandField>
                </Columns>
                <HeaderStyle Font-Bold="True" Font-Size="12px" Height="24px" Wrap="True" />
                <RowStyle Height="24px" />
            </asp:GridView>
            <cc1:PageNavigation ID="PageNavigation1" runat="server" OnPageChanging="PageNavigation1_PageChanging"
                SubmitButtonClass="btn" PageSize="15">
            </cc1:PageNavigation>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</asp:Content>
