<%@ Page Title="" Language="C#" MasterPageFile="~/Master/MasterPage.master" AutoEventWireup="true" CodeBehind="ConfigCMS.aspx.cs" Inherits="PirTickets.ConfigCMS" EnableViewStateMac="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>CMS Items</h2>
<p>
    <asp:Button ID="btAdd" runat="server" onclick="btAdd_Click" Text="Add Item" />
</p>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="SqlDataConfig" 
        Width="453px" onselectedindexchanged="GridView1_SelectedIndexChanged" 
        AutoGenerateDeleteButton="True" BorderStyle="Solid" BorderWidth="1px" 
    CellPadding="4" ForeColor="#333333" ShowFooter="True">
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
            <asp:CommandField ShowSelectButton="True" />
            <asp:BoundField DataField="name" HeaderText="name" SortExpression="name" >
           
            <ItemStyle Font-Bold="True" Width="80%" />
            </asp:BoundField>
           
        </Columns>
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataConfig" runat="server" 
        ConnectionString="<%$ ConnectionStrings:PirTickets %>" 
        SelectCommand="SELECT [id], [name], [value] FROM [cms] "
        DeleteCommand="DELETE FROM cms where id =@id">
    </asp:SqlDataSource>

<br />

</asp:Content>
