selectscore.aspx

来自「《精通ASP.NET2.0网络应用系统开发》书中的源码」· ASPX 代码 · 共 92 行

ASPX
92
字号
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SelectScore.aspx.cs" Inherits="DesktopModules_Score_SelectScore" %>

<!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 runat="server">
    <title>成绩查询</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">
		<LINK href="../../Css/ASPNET2BaseCss.css" type="text/css" rel="stylesheet">
	</HEAD>
	<body leftMargin="0" topMargin="0">
		<form id="Form1" method="post" runat="server">
			<table border="0" cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE: collapse" bordercolor="#111111"
				width="100%" height="1">
				<tr height="30">
					<td width="3%" bgcolor="#c0d9e6" class="GbText" background="../../Images/treetopbg.jpg"><font color="#006699" size="3"><img src="../../Images/moduleheaher.gif" width="16" height="16"></font></td>
					<td bgcolor="#c0d9e6" class="GbText" background="../../Images/treetopbg.jpg"><b>学生成绩查询</b></td>
				</tr>
			</table>
			<TABLE class="GbText" style="BORDER-COLLAPSE: collapse" borderColor="#93bee2" cellSpacing="0"
				cellPadding="0" width="100%" border="1">
				<tr height="30">
					<td colspan="2"><asp:DropDownList runat="server" ID="MethodList" CssClass="SelectSta" Width="200" AutoPostBack="True" OnSelectedIndexChanged="MethodList_SelectedIndexChanged">
						<asp:ListItem Value="0">按年级查询</asp:ListItem>
						<asp:ListItem Value="1">按班级查询</asp:ListItem>
						<asp:ListItem Value="2">按学生查询</asp:ListItem>
						<asp:ListItem Value="3">按课程查询</asp:ListItem>
					</asp:DropDownList><font class="GbText">请选择查询方式</font></td>
				</tr>
				<tr height="30">
					<td colspan="2"><asp:DropDownList runat="server" ID="GradeList" CssClass="SelectSta" Width="200" AutoPostBack="True" OnSelectedIndexChanged="GradeList_SelectedIndexChanged" Visible="False">					
					</asp:DropDownList><asp:Label ID="GradeLable" runat="server" Visible="False"><font class="GbText">请选择年级</font></asp:Label></td>
				</tr>
				<tr height="30">
					<td colspan="2"><asp:DropDownList runat="server" ID="ClassList" CssClass="SelectSta" Width="200" AutoPostBack="True" OnSelectedIndexChanged="ClassList_SelectedIndexChanged" Visible="False">					
					</asp:DropDownList><asp:Label ID="ClassLabel" runat="server" Visible="False"><font class="GbText">请选择班级</font></asp:Label></td>
				</tr>
				<tr height="30">
					<td colspan="2"><asp:DropDownList runat="server" ID="StudentList" CssClass="SelectSta" Width="200" AutoPostBack="True" Visible="False">					
					</asp:DropDownList><asp:Label ID="StudentLabel" runat="server" Visible="False"><font class="GbText">请选择学生</font></asp:Label></td>
				</tr>
				<tr height="30">
					<td colspan="2"><asp:DropDownList runat="server" ID="CourseList" CssClass="SelectSta" Width="200" AutoPostBack="True" Visible="False">					
					</asp:DropDownList><asp:Label ID="CourseLabel" runat="server" Visible="False"><font class="GbText">请选择课程</font></asp:Label></td>
				</tr>		
				<tr height="30">
					<td colspan="2" align="center">
						<asp:Button ID="SelectBtn" runat="server" CssClass="ButtonCss" Text="查询学生成绩" Width="200px" OnClick="SelectBtn_Click" /></td>
				</tr>		
				<tr height="30">
					<td colspan="2"><hr size="2" color="darkred" /></td>
				</tr>
				<tr height="30">
					<td colspan="2">
					<asp:DataGrid ID="ScoreList" Width="100%" CssClass="GbText" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1" CellPadding="4">
						<Columns>
							<asp:TemplateColumn HeaderText="学生名称" ItemStyle-BorderWidth="1">
								<ItemTemplate>
									<%#DataBinder.Eval(Container.DataItem,"Name") %>
								</ItemTemplate>
							</asp:TemplateColumn>
							<asp:TemplateColumn HeaderText="课程名称" ItemStyle-BorderWidth="1">
								<ItemTemplate>
									<%#DataBinder.Eval(Container.DataItem,"Desn") %>
								</ItemTemplate>
							</asp:TemplateColumn>
							<asp:TemplateColumn HeaderText="成绩" ItemStyle-BorderWidth="1">
								<ItemTemplate>
									<%#DataBinder.Eval(Container.DataItem,"Mark") %>
								</ItemTemplate>
							</asp:TemplateColumn>
						</Columns>
						<FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
						<SelectedItemStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
						<PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
						<ItemStyle BackColor="White" ForeColor="#330099" />
						<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
					</asp:DataGrid></td>
				</tr>								
				<TR height="30">
					<TD align="right" width="150">&nbsp;</TD>
					<TD align="left"><FONT face="宋体">&nbsp;</FONT>
						<asp:button id="ReturnBtn" runat="server" Width="100px" CssClass="ButtonCss" Text="返      回"
							CausesValidation="False" OnClick="ReturnBtn_Click"></asp:button></TD>
				</TR>
			</TABLE>
		</form>
	</body>
</HTML>

⌨️ 快捷键说明

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