<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SampleDataLists.aspx.cs" Inherits="SampleDataLists" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
   <title>Przykładowa kontrolka DataLists</title>
   <link href="chapterStyles.css" type="text/css" rel="stylesheet" />
</head>
<body>
   <form id="form1" runat="server">
      <div id="container">
         <h1>Testowanie kontrolki DataList</h1>
         <p>
         W przykładzie pokazano kilka kontrolek <code>DataList</code>.
         </p>
         
         <asp:DataList ID="dlstPub" runat="server" DataSourceID="dsPubs"
            CellPadding="5" RepeatLayout="Table">
            <HeaderTemplate>
               <h2>Wydawcy</h2>
            </HeaderTemplate>
            <ItemTemplate>
               <a href="EditPublisher.aspx?id=<%# Eval("PublisherId") %>">
               <%# Eval("PublisherName") %>
               </a>
            </ItemTemplate>
            <ItemStyle BackColor="AntiqueWhite" ForeColor="Brown" Font-Size="Small"
                Width="150" Height="25" />
            <AlternatingItemStyle BackColor="silver" />
            <SeparatorStyle BackColor="crimson" Height="5" />
            <SeparatorTemplate></SeparatorTemplate>
         </asp:DataList><br />
         
         
         <asp:DataList ID="DataList1" runat="server" DataSourceID="dsPubs"
            CellPadding="3" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" GridLines="Vertical">

            <ItemTemplate>
               <%# Eval("PublisherName") %>
            </ItemTemplate>
            <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
            <SelectedItemStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
            <AlternatingItemStyle BackColor="#DCDCDC" />
            <ItemStyle BackColor="#EEEEEE" ForeColor="Black" />
            <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
            <FooterStyle Font-Bold="true" />
            <FooterTemplate>
               Liczba wydawców: 6
            </FooterTemplate>
         </asp:DataList>         

<asp:SqlDataSource ID="dsPubs" runat="server"
    ProviderName="System.Data.SqlClient" 
    ConnectionString="<%$ ConnectionStrings:BookCatalog %>"
    SelectCommand="Select PublisherId,PublisherName From Publishers" />                       
      </div>
   </form>
</body>
</html>

