<%@ Page Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true" CodeFile="PhotoManager.aspx.cs" Inherits="Admin_PhotoManager" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table style="width: 100%">
        <tr>
            <td>
                <asp:Label ID="Label1" runat="server" Text="Select Album :"></asp:Label>
                <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1" DataTextField="Name" DataValueField="AlbumID" OnDataBound="DropDownList1_DataBound" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
                </asp:DropDownList><br />
                <br />
                <asp:LinkButton ID="LinkButton3" runat="server" OnClick="LinkButton3_Click">Add a new photo</asp:LinkButton></td>
        </tr>
        <tr>
            <td>
                <asp:Panel ID="Panel1" runat="server" Height="50px" Visible="False" Width="100%">
                    <table style="width: 100%">
                        <tr>
                            <td align="right" nowrap="nowrap" width="10%">
                                <asp:Label ID="Label4" runat="server" Text="Photo :"></asp:Label></td>
                            <td>
                                <asp:FileUpload ID="File1" runat="server" /></td>
                        </tr>
                        <tr>
                            <td align="right" nowrap="nowrap" width="10%">
                                <asp:Label ID="Label5" runat="server" Text="Name :"></asp:Label></td>
                            <td>
                                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td align="right" nowrap="nowrap" width="10%">
                                <asp:Label ID="Label6" runat="server" Text="Description :"></asp:Label></td>
                            <td>
                                <asp:TextBox ID="TextBox2" runat="server" TextMode="MultiLine"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td align="right" nowrap="nowrap" width="10%">
                                <asp:Label ID="Label7" runat="server" Text="Thumbnail Height :"></asp:Label></td>
                            <td>
                                <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td align="right" nowrap="nowrap" width="10%">
                                <asp:Label ID="Label8" runat="server" Text="Thumbnail Width :"></asp:Label></td>
                            <td>
                                <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td align="left" colspan="2" nowrap="nowrap">
                                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Save" />&nbsp;<asp:Button
                                    ID="Button2" runat="server" Text="Cancel" /></td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td>
                <asp:DataList ID="DataList1" runat="server" Width="100%" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical" OnItemDataBound="DataList1_ItemDataBound" OnItemCommand="DataList1_ItemCommand" OnSelectedIndexChanged="DataList1_SelectedIndexChanged">
                    <ItemTemplate>
                        <table style="width: 100%">
                            <tr>
                                <td rowspan="4" valign="top" nowrap="noWrap" width="10%">
                                    <asp:Image ID="Image1" runat="server" /></td>
                                <td style="height: 21px">
                                    <asp:Label ID="Label2" runat="server" Text='<%# Eval("Name") %>'></asp:Label></td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label3" runat="server" Text='<%# Eval("Description") %>'></asp:Label></td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label9" runat="server" Text="Thumbnail :"></asp:Label>
                                    <asp:Label ID="Label10" runat="server" Text='<%# Eval("thumbnailheight") %>'></asp:Label>
                                    <asp:Label ID="Label11" runat="server" Text=" X "></asp:Label>
                                    <asp:Label ID="Label12" runat="server" Text='<%# Eval("thumbnailwidth") %>'></asp:Label></td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Edit">Edit</asp:LinkButton>&nbsp;
                                    <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Delete">Delete</asp:LinkButton></td>
                            </tr>
                        </table>
                    </ItemTemplate>
                    <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                    <AlternatingItemStyle BackColor="Gainsboro" />
                    <ItemStyle BackColor="#EEEEEE" ForeColor="Black" />
                    <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
                </asp:DataList></td>
        </tr>
    </table>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT [AlbumID], [Name] FROM [Albums] ORDER BY [Name]"></asp:SqlDataSource>
    <br />
</asp:Content>

