温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:Asp.net简单网络选课系统源码
当前文件路径:MyElectCourse/teacherQueryElect.aspx

1<%@ Page Language="C#" AutoEventWireup="true" CodeFile="teacherQueryElect.aspx.cs" Inherits="teacherQueryElect" %> 2
3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 4
5
<html xmlns="http://www.w3.org/1999/xhtml" > 6
<head runat="server"> 7
<title>QueryElect</title> 8
</head> 9
<body topmargin=2> 10
<form id="form1" runat="server"> 11
<div> 12
<table id=table1 border=0 width=260 align=center> 13
<tr> 14
<td align=center height=40> 15
<asp:label id="lblmessage" Font-Size="10pt" Runat="server">课程名称:</asp:label> 16
<asp:dropdownlist id="ddlCource" runat="server" Font-Size="10pt" Width="85px" AutoPostBack="True"></asp:dropdownlist> 17
</td> 18
</tr> 19
<tr> 20
<td align=center> 21
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White" 22
BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataSourceID="SqlDataSource1" 23
Font-Size="10pt" GridLines="Vertical" Width=260> 24
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" /> 25
<Columns> 26
<asp:BoundField DataField="stuID" HeaderText="学号" SortExpression="stuID" /> 27
<asp:BoundField DataField="stuName" HeaderText="姓名" SortExpression="stuName" /> 28
<asp:BoundField DataField="stuGrade" HeaderText="年级" SortExpression="stuGrade" /> 29
<asp:BoundField DataField="stuClass" HeaderText="班级" SortExpression="stuClass" /> 30
<asp:BoundField DataField="Score" HeaderText="成绩" SortExpression="Score" /> 31
</Columns> 32
<RowStyle BackColor="#EEEEEE" ForeColor="Black" /> 33
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" /> 34
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /> 35
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" /> 36
<AlternatingRowStyle BackColor="#DCDCDC" /> 37
</asp:GridView> 38
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 39
SelectCommand="SELECT Elect.stuID, Student.stuName, Student.stuGrade, Student.stuClass, Elect.Score FROM Elect INNER JOIN Student ON Elect.stuID = Student.stuID WHERE (Elect.courceID = @courceID)"> 40
<SelectParameters> 41
<asp:ControlParameter ControlID="ddlCource" Name="courceID" PropertyName="SelectedValue" /> 42
</SelectParameters> 43
</asp:SqlDataSource> 44
</td> 45
</tr> 46
<tr> 47
<td align=center> 48
<asp:HyperLink ID="HyperLink1" runat="server" Font-Size="10pt" NavigateUrl="~/teacherSubmitScore.aspx">提交成绩</asp:HyperLink> 49
50
<asp:HyperLink ID="HyperLink2" runat="server" Font-Size="10pt" NavigateUrl="~/ModifyPwd.aspx">修改密码</asp:HyperLink></td> 51
</tr> 52
</table> 53
</div> 54
</form> 55
</body> 56
</html> 57



