<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="displayalbum.aspx.cs" Inherits="displayalbum" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Default.aspx" Font-Bold="True" Font-Names="Verdana" Font-Size="14px">Back to album list</asp:HyperLink><br />
    <asp:DataList ID="DataList1" runat="server" DataKeyField="PhotoID" DataSourceID="SqlDataSource1"
        OnItemDataBound="DataList1_ItemDataBound" RepeatColumns="2" RepeatDirection="Horizontal"
        Width="100%">
        <ItemTemplate>
            <table style="width: 100%" cellpadding="5">
                <tr>
                    <td nowrap="nowrap" rowspan="1" valign="top" width="10%">
                        <asp:Image ID="Image1" runat="server" /></td>
                    <td style="height: 21px" valign="top" width="50%">
                        <asp:HyperLink ID="HyperLink1" runat="server" Font-Bold="True" Font-Size="Larger"
                            NavigateUrl='<%# Eval("PhotoID", "~/displayphoto.aspx?photoid={0}") %>' Text='<%# Eval("Name") %>' Font-Names="Verdana"></asp:HyperLink><br />
                        <asp:Label ID="Label3" runat="server" Text='<%# Eval("Description") %>' Font-Names="Verdana" Font-Size="12px"></asp:Label><br />
                        <asp:Label ID="Label2" runat="server" Font-Italic="False" Font-Size="10px" Text="Added :" Font-Names="Verdana"></asp:Label>
                        <asp:Label ID="Label1" runat="server" Font-Italic="False" Font-Size="10px" Text='<%# Eval("DateCreated", "{0:g}") %>' Font-Names="Verdana"></asp:Label></td>
                </tr>
            </table>
        </ItemTemplate>
        <ItemStyle VerticalAlign="Top" Width="50%" />
    </asp:DataList><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT * FROM [Photos] WHERE ([AlbumID] = @AlbumID)">
        <SelectParameters>
            <asp:QueryStringParameter Name="AlbumID" QueryStringField="albumid" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>

