<%@ Page language="c#" Codebehind="DataListFeatures.aspx.cs" AutoEventWireup="false" Inherits="UsingServerControls.DataListFeatures" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>DataListFeatures</title>
		<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form id="DataListFeatures" method="post" runat="server">
			<asp:datalist id="BookList" style="Z-INDEX: 101; LEFT: 25px; POSITION: absolute; TOP: 25px" runat="server" CellSpacing="2">
				<SelectedItemStyle ForeColor="White" BackColor="Red"></SelectedItemStyle>
				<EditItemStyle ForeColor="Black" BackColor="Yellow"></EditItemStyle>
				<HeaderTemplate>
					<b>Books in stock : </b>
					<br />
				</HeaderTemplate>
				<ItemTemplate>
					<ASP:Button CommandName="Select" Text="Info" runat="server" ID="Button1" />
					<%# DataBinder.Eval(Container.DataItem, "Title") %>
				</ItemTemplate>
				<SelectedItemTemplate>
					Title: <b>
						<%# DataBinder.Eval(Container.DataItem, "Title") %>
					</b>
					<br />
					<ASP:Button CommandName="Edit" Text="Edit" runat="server" ID="Button2" />
					Price:
					<%# DataBinder.Eval(Container.DataItem, "Price") %>
					&nbsp;
				</SelectedItemTemplate>
				<EditItemTemplate>
					<ASP:Button CommandName="Update" Text="Update" runat="server" ID="Button3" />
					<ASP:Button CommandName="Delete" Text="Delete" runat="server" ID="Button4" />
					<ASP:Button CommandName="Cancel" Text="Cancel" runat="server" ID="Button5" /><br />
					Title:
					<ASP:TextBox id="txtTitle" Text='<%# DataBinder.Eval(Container.DataItem, "Title") %>' size="46" runat="server" /><br />
					Price:
					<ASP:TextBox id="txtPrice" size="20" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Price") %>' />
					<input type="hidden" runat="server" id="txtID" value='<%# DataBinder.Eval(Container.DataItem, "TitleID")%>' />
				</EditItemTemplate>
			</asp:datalist></form>
	</body>
</HTML>
