<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RepeaterExample3.aspx.cs" Inherits="Repeater.RepeaterExample3" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Repeater Example</title>
</head>
<body bgcolor="#ffcc66">
<h3>This example demonstrates handling a button click event
with a Repeater control.</h3>
<div>
<form id="form1" runat="server">
<asp:Label ID="lblDisplay" runat="server" Text=""></asp:Label>
<br /><br />
<table>
<tr style="color: #CC3300;">
<th>Product
ID</th>
<th>Description</th>
<th>Price</th>
<th>Quantity
in stock</th>
</tr>
<asp:Repeater ID="rptProducts" runat="server" OnItemCommand="rptProducts_ItemCommand">
<ItemTemplate>
<tr>
<td>
<asp:Label ID="lblProductID" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ProductNumber") %>'></asp:Label>
</td>
<td>
<asp:Label ID="lblDescription" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Description") %>'></asp:Label>
</td>
<td>
<asp:Label ID="lblPrice" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Price", "{0:c}") %>'></asp:Label>
</td>
<td>
<asp:Label ID="lblQOH" runat="server" Text='<%# Bind("QOH") %>'></asp:Label>
</td>
<td>
<asp:Button ID="btnSelect" Text="Select Product" runat="server" />
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
</form>
</div>
</body>
</html>