⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 employee.aspx

📁 程序中带有大量的实例,采用多种方式优化代码,这初学者很好的学习资料
💻 ASPX
字号:
<%@ Page language="c#" Codebehind="Employee.aspx.cs" AutoEventWireup="false" Inherits="Web.Employee" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>Employee</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">
			<table style="WIDTH: 646px" align="center">
				<tr>
					<td align="center" colspan="3" rowspan="2">
						<asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="XX-Large" ForeColor="#0000C0"
							Text="人员维护" Width="642px"></asp:Label></td>
				</tr>
				<tr>
				</tr>
				<tr>
					<td>
					</td>
					<td>
					</td>
					<td>
					</td>
				</tr>
			</table>
			<table border="1" align="center">
				<tr>
					<td style="WIDTH: 177px; HEIGHT: 21px">
						<asp:Label ID="Label2" runat="server" Text="编号:" Width="164px"></asp:Label></td>
					<td style="WIDTH: 211px; HEIGHT: 21px">
						<asp:TextBox ID="TextBox1" runat="server" CausesValidation="True" Width="177px" ReadOnly="True"></asp:TextBox></td>
					<td style="WIDTH: 231px; HEIGHT: 21px">
						<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="编号为4位数字"
							ValidationExpression="[0-9]{4}" Width="104px"></asp:RegularExpressionValidator>
						<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox1" ErrorMessage="编号不能为空"
							Width="110px"></asp:RequiredFieldValidator></td>
				</tr>
				<tr>
					<td style="WIDTH: 177px">
						<asp:Label ID="Label3" runat="server" Text="姓名:" Width="164px"></asp:Label></td>
					<td style="WIDTH: 211px">
						<asp:TextBox ID="TextBox2" runat="server" Width="176px"></asp:TextBox></td>
					<td style="WIDTH: 231px"></td>
				</tr>
				<tr>
					<td style="WIDTH:177px">
						<asp:Label ID="Label5" runat="server" Text="部门:" Width="164px"></asp:Label>
					</td>
					<td style="WIDTH:211px">
						<asp:DropDownList ID="DropDownList1" runat="server" Width="121px"></asp:DropDownList>
					</td>
					<td style="WIDTH:231px">
						&nbsp;<asp:Label ID="Label7" runat="server" Width="238px"></asp:Label>
					</td>
				</tr>
				<tr>
					<td style="WIDTH:177px; HEIGHT:26px">
						<asp:Label ID="Label6" runat="server" Text="职务:" Width="164px"></asp:Label></td>
					<td style="WIDTH:211px; HEIGHT:26px">
						<asp:DropDownList ID="DropDownList2" runat="server" Width="121px"></asp:DropDownList></td>
					<td style="WIDTH:231px; HEIGHT:26px">
						<asp:Label ID="Label8" runat="server" Width="238px"></asp:Label></td>
				</tr>
				<tr>
					<td style="WIDTH:177px">
						<asp:Label ID="Label9" runat="server" Text="生日:" Width="164px"></asp:Label></td>
					<td style="WIDTH:211px">
						&nbsp; &nbsp;&nbsp;
						<asp:RadioButton ID="RadioButton1" runat="server" Checked="True" GroupName="aa" Text="阳历" />
						&nbsp; &nbsp;<asp:RadioButton ID="RadioButton2" runat="server" GroupName="aa" Text="阴历" /></td>
					<td style="WIDTH:231px">
						<asp:Label ID="Label10" runat="server" Text="年"></asp:Label>
						&nbsp;
						<asp:TextBox ID="TextBox3" runat="server" MaxLength="4" Width="53px"></asp:TextBox>&nbsp;
						<asp:Label ID="Label11" runat="server" Text="月"></asp:Label>&nbsp;
						<asp:TextBox ID="TextBox4" runat="server" MaxLength="2" Width="31px"></asp:TextBox>&nbsp;
						<asp:Label ID="Label12" runat="server" Text="日"></asp:Label>&nbsp;
						<asp:TextBox ID="TextBox5" runat="server" MaxLength="2" Width="31px"></asp:TextBox></td>
				</tr>
			</table>
			<asp:Label ID="Label4" runat="server" Text="    " Width="628px"></asp:Label><br>
			<table align="center">
				<tr>
					<td style="WIDTH: 209px"><FONT face="宋体"></FONT>
					</td>
					<td style="WIDTH: 213px">&nbsp;&nbsp;&nbsp;&nbsp;
						<asp:Button id="Button1" runat="server" Text="保存"></asp:Button>&nbsp;
						<asp:Button id="Button2" runat="server" Text="取消"></asp:Button>&nbsp;&nbsp;
						<asp:Button id="Button3" runat="server" Text="返回"></asp:Button></td>
					<td style="WIDTH: 220px">
					</td>
				</tr>
				<tr>
					<td colspan="3" style="HEIGHT: 177px">
						<asp:DataGrid id="DataGrid1" runat="server" Width="648px" CellPadding="4" AutoGenerateColumns="False"
							BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px">
							<SelectedItemStyle Font-Bold="True" ForeColor="#663399" BackColor="#FFCC66"></SelectedItemStyle>
							<ItemStyle ForeColor="#330099" BackColor="White"></ItemStyle>
							<HeaderStyle Font-Bold="True" ForeColor="#FFFFCC" BackColor="#990000"></HeaderStyle>
							<FooterStyle ForeColor="#330099" BackColor="#FFFFCC"></FooterStyle>
							<Columns>
								<asp:BoundColumn DataField="EmployeeId" HeaderText="编号"></asp:BoundColumn>
								<asp:BoundColumn DataField="EmployeeName" HeaderText="姓名"></asp:BoundColumn>
								<asp:BoundColumn DataField="DepartmentName" HeaderText="所属部门"></asp:BoundColumn>
								<asp:BoundColumn DataField="HeadshipName" HeaderText="职务"></asp:BoundColumn>
								<asp:BoundColumn DataField="Birthday" HeaderText="生日日期(阳历)"></asp:BoundColumn>
								<asp:BoundColumn DataField="BirthdayLunch" HeaderText="生日日期(阴历)"></asp:BoundColumn>
							</Columns>
							<PagerStyle HorizontalAlign="Center" ForeColor="#330099" BackColor="#FFFFCC"></PagerStyle>
						</asp:DataGrid>
					</td>
				</tr>
				<tr>
					<td style="WIDTH: 209px">
					</td>
					<td style="WIDTH: 213px">
					</td>
					<td style="WIDTH: 220px">
					</td>
				</tr>
			</table>
		</form>
	</body>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -