<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Products.aspx.cs" Inherits="Products" Title="Produkty" %>
<%@ MasterType TypeName="MasterPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="ContentMedium">Category : 
<asp:DropDownList ID="ddlCategories" runat="server" DataValueField="CategoryId" DataTextField="CategoryName" OnSelectedIndexChanged="ddlCategories_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
<br /><br />
<asp:DataList ID="ProductDataList" runat="server" RepeatColumns="3" RepeatDirection="Horizontal">
        <ItemTemplate>
            <div class="ProductList">
                <a href='ProductDetails.aspx?ProductId=<%# Eval("ProductId") %>'>
                    <img src="ImageHandler.ashx?ImageId=<%# Eval("ImageId") %>" alt='<%# Eval("ImageName") %>' width="150" height="100" />
                </a>
                <a href='ProductDetails.aspx?ProductId=<%# Eval("ProductId") %>'>
                    <div class="ContentMedium"><%# Eval("ProductName") %></div>
                    <div class="ContentMedium">Cena:<%# String.Format("{0:##.00}", Eval("SellingPrice")) %></div>
                </a><br />
            </div>
        </ItemTemplate>
    </asp:DataList></div>
</asp:Content>