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

<!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>Using an ArrayList</title>
   <link href="chapterStyles.css" type="text/css" rel="stylesheet" />
   <style type="text/css">
      .panelBox { border: 1pt solid black; background-color: beige; width: 15em; margin-top: 1em; padding: 1em;  }
   </style>
</head>
<body>
   <form id="form1" runat="server">
      <div id="container">
         <h1>Using an ArrayList</h1>
         <p>
         In this example, the drop-down list is 
         data bound to an <code>ArrayList</code>.
         </p>
         
         <asp:Panel ID="panList" runat="server" >
			   <h2>Select customer from list:</h2>
			   <p>
			   <asp:ListBox id="lboxCustomers" runat="server" AutoPostBack="True"
				    DataTextField="Name"
					 DataValueField="Id"  
					 OnSelectedIndexChanged="SelectCustomer" />
				</p>
         </asp:Panel>
         
			<asp:Panel ID="panCustomer" runat="server" CssClass="panelBox">					
				<h2>Customer Information</h2>
			   <p>Id:<br />
				<asp:TextBox id="txtId" runat="server" /></p>
			   <p>First Name:<br />
				<asp:TextBox id="txtFirst" runat="server" /></p>
			   <p>Last Name:<br />
				<asp:TextBox id="txtLast" runat="server" /></p>
			   <p>Phone Number:<br />
				<asp:TextBox id="txtPhone" runat="server" /></p>
			</asp:Panel>
      </div>
   </form>
</body>
</html>
