<%@ Page Language="VB" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="Default.aspx.vb" Inherits="Rebex.Samples.Default"%>

<%@ Import Namespace="Rebex.Samples" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <%-- page header --%>
    <h2>Sample ZIP files</h2>

    <%-- show list of sample ZIP files --%>
    <div>
        <asp:GridView ID="FilesGridView" runat="server" CssClass="list" BorderStyle="None" BorderWidth="0" 
            BorderColor="whitesmoke" RowStyle-BorderColor="white" AlternatingRowStyle-BackColor="whitesmoke"
            AutoGenerateColumns="false">
            <HeaderStyle CssClass="listHeader" />
            <Columns>
                <asp:TemplateField HeaderText="Name" ItemStyle-CssClass="tdName" ItemStyle-Width="600">
                    <ItemTemplate>
                        <a href="<%# GetUrl(TryCast(Container.DataItem, System.IO.FileInfo)) %>">
                            <asp:Image ID="imgFile" runat="server" ImageUrl="<%# Util.GetIcon(IconType.File) %>" AlternateText="file" /><%# Eval("Name") %></a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Size" HeaderStyle-CssClass="thNumber" ItemStyle-CssClass="tdNumber" ItemStyle-Width="100" ItemStyle-Wrap="false" >
                    <ItemTemplate>
                        <%#Util.GetSize(CType(Eval("Length"), Long))%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField HeaderText="Modified" DataField="LastWriteTime" DataFormatString="{0:G}" 
                    HeaderStyle-CssClass="thDate" ItemStyle-CssClass="tdDate" ItemStyle-Wrap="false" />
            </Columns>
            <EmptyDataTemplate>
                No files
            </EmptyDataTemplate>
        </asp:GridView>
    </div>
</asp:Content>
