<%@ Page language="c#" Codebehind="DataListEditItem.aspx.cs" AutoEventWireup="false" Inherits="CommonFunction.DataListEditItem" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>DataListEditItem</title>
		<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form id="Form1" method="post" runat="server">
			<h2>使用DataList控件的编辑模板</h2>
			<asp:DataList id="dlEditItem" style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 48px"
				runat="server" Height="136px" DataKeyField="EmployeeID">
				<HeaderTemplate>
					人员信息
				</HeaderTemplate>
				<FooterTemplate>
					<hr color="red">
				</FooterTemplate>
				<ItemTemplate>
					<asp:Button id="edit" CommandName="edit" Text="编辑" Runat="server"></asp:Button><%#DataBinder.Eval(Container.DataItem,"LastName")%><%#DataBinder.Eval(Container.DataItem,"FirstName")%>
				</ItemTemplate>
				<EditItemTemplate>
					<asp:Label id="lastname" Runat="server">
						<%#DataBinder.Eval(Container.DataItem,"LastName")%>
					</asp:Label>
					<asp:Label id="FirstName" Runat="server">
						<%#DataBinder.Eval(Container.DataItem,"FirstName")%>
					</asp:Label>
					<asp:TextBox id=Title runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Title")%>'>
					</asp:TextBox>
					<asp:TextBox id=titleOfCourtesy runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"TitleOfCourtesy")%>'>
					</asp:TextBox>
					<asp:Button id="update" CommandName="update" Text="更新" Runat="server"></asp:Button>
					<asp:Button id="cancel" CommandName="cancel" Text="取消" Runat="server"></asp:Button>
				</EditItemTemplate>
			</asp:DataList>
		</form>
	</body>
</HTML>
