<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestDataList.aspx.cs" Inherits="TestDataList" %>

<!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>Test kontrolki DataList</title>
   <link href="chapterStyles.css" type="text/css" rel="stylesheet" />
</head>
<body>
   <form id="form1" runat="server">
      <div id="container">
         <h1>Test kontrolki DataList</h1>
         <p>
         Przykład pokazuje, jak używać kontrolki <code>DataList</code>.
         </p>
         <asp:DataList ID="dlstPub" runat="server" DataSourceID="dsPubs"
            CellPadding="5" RepeatLayout="Table">
            <HeaderTemplate>
               <h2>Wydawcy</h2>
            </HeaderTemplate>
            <ItemTemplate>

               <asp:HyperLink ID="hypLink" runat="server" 
                 NavigateUrl='EditPublisher.aspx?id=<%# Eval("PublisherId") %>'
                 Text='<%# Eval("PublisherName") %>' />

            </ItemTemplate>
            <ItemStyle BackColor="AntiqueWhite" ForeColor="Brown" Font-Size="Medium"
                Width="150" Height="25" />
            <AlternatingItemStyle BackColor="silver" />
            <SeparatorStyle BackColor="crimson" Height="5" />
            <SeparatorTemplate></SeparatorTemplate>
         </asp:DataList><br />

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