<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="SettingsManagement.aspx.cs" Inherits="Admin.SettingsManagement" Title="Settings Management"
    ValidateRequest="false" MaintainScrollPositionOnPostback="true" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <br />
    <br />
    <asp:Label ID="lblError" runat="server" Visible="false" ForeColor="Red" EnableViewState="false"></asp:Label>
    <asp:ValidationSummary ID="vsSummaryQuotes" runat="server" ValidationGroup="Quotes" />
    <asp:ValidationSummary ID="vsSummarySettings" runat="server" ValidationGroup="Settings" />
    <h3>
        Enter new quote:
    </h3>
    <asp:RequiredFieldValidator ID="rfvQuote" runat="server" ErrorMessage="Quote text is empty"
        ControlToValidate="txtQuote" ValidationGroup="Quotes">*</asp:RequiredFieldValidator>
    <asp:TextBox ID="txtQuote" runat="server" Width="90%" TextMode="MultiLine" Rows="3"
        MaxLength="255" EnableViewState="false"></asp:TextBox>
    <h3>
        Enter quote author:
    </h3>
    <asp:TextBox ID="txtAuthor" runat="server" MaxLength="100" EnableViewState="false"></asp:TextBox>
    <br />
    <br />
    <asp:Button ID="btnAddQuote" runat="server" Text="Add Quote" OnClick="btnAddQuote_Click"
        EnableViewState="false" ValidationGroup="Quotes" />
    <br />
    <br />
    <asp:GridView ID="gvQuotes" runat="server" AutoGenerateDeleteButton="True" AllowPaging="True"
        AllowSorting="True" DataSourceID="ldsQuotes" PageSize="20" DataKeyNames="QuoteID"
        EnableViewState="True" OnRowDeleted="gvQuotes_RowDeleted">
    </asp:GridView>
    <asp:LinqDataSource ID="ldsQuotes" runat="server" ContextTypeName="BlogNETDataContext"
        TableName="Quotes" AutoSort="True" OrderBy="QuoteID ASC" EnableDelete="true"
        EnableViewState="True" />
    <br />
    <br />
    <h3>
        Enter website title:
    </h3>
    <asp:TextBox ID="txtTitle" runat="server" MaxLength="100" EnableViewState="false"></asp:TextBox>
    <h3>
        Enter website slogan:
    </h3>
    <asp:TextBox ID="txtSlogan" runat="server" Width="90%" TextMode="MultiLine" Rows="3"
        EnableViewState="false"></asp:TextBox>
    <h3>
        Enter about content:
    </h3>
    <asp:TextBox ID="txtAbout" runat="server" Width="90%" TextMode="MultiLine" Rows="20"
        EnableViewState="false"></asp:TextBox>
    <h3>
        Select comments page size:
    </h3>
    <asp:DropDownList ID="ddlCommentsPageSize" runat="server" EnableViewState="false">
    <asp:ListItem>5</asp:ListItem>
    <asp:ListItem>10</asp:ListItem>
    <asp:ListItem>15</asp:ListItem>
    <asp:ListItem>20</asp:ListItem>
    <asp:ListItem>25</asp:ListItem>
    <asp:ListItem>30</asp:ListItem>
    <asp:ListItem>35</asp:ListItem>
    <asp:ListItem>40</asp:ListItem>
    <asp:ListItem>45</asp:ListItem>
    <asp:ListItem>50</asp:ListItem>
    </asp:DropDownList>
    <br />
    <br />
    <asp:Button ID="btnSaveSetting" runat="server" Text="Save Settings" EnableViewState="false"
        OnClick="btnSaveSetting_Click" ValidationGroup="Settings" />
    <br />
    <br />
    <asp:Label ID="lbSaveSuccessful" runat="server" ForeColor="Red" Visible="false" EnableViewState="false">Settings saved.</asp:Label>
</asp:Content>
