mentorList.aspx
上传用户:ah_jiwei
上传日期:2022-07-24
资源大小:54044k
文件大小:2k
源码类别:

数据库编程

开发平台:

Visual C++

  1. <%@ Page Language="C#"  MasterPageFile = "../MasterPage3.master" AutoEventWireup="true" CodeFile="mentorList.aspx.cs" Inherits="student_mentorList"  Title="导师查询"%>
  2. <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  3.       <div style="margin-top:10px;width:380px; height:350px;"> 
  4.             <div style="float:left">
  5.                 <img src="../image/biaoti_xiushi.gif" width="21" height="21" longdesc="../image/biaoti_xiushi.gif" />
  6.             </div>
  7.     <div style="float:left;">
  8.     <span class="STYLE4">导师查询</span>   
  9.     </div>
  10.    <div style="float:right;">
  11.      <asp:Button ID="Button" runat="server"  Text="选择" OnClick="Button_Click"/>   
  12.    </div>
  13.    <div style="background-image:url(../image/division.JPG);background-repeat:repeat-x; height:2px; width:380px;">
  14.    </div>
  15.    <div>
  16.                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
  17.                    AutoGenerateColumns="False" DataKeyNames="tea_id"  DataSourceID="SqlDataSource1" Width="377px" >
  18.                    <Columns>
  19.                      
  20.                         <asp:HyperLinkfield  Text="选择"  Visible= "true"  SortExpression="tea_name"   DataNavigateUrlFields="tea_id" DataNavigateUrlFormatString = "mentorList.aspx?tea_Id={0}">
  21.                        </asp:HyperLinkfield>
  22.                        <asp:HyperLinkfield DataTextField="tea_name"  HeaderText="教师姓名" SortExpression="tea_name"  DataNavigateUrlFields="tea_id" DataNavigateUrlFormatString = "details.aspx?tea_Id={0}">
  23.                        </asp:HyperLinkfield>
  24.                        <asp:BoundField DataField="tea_toward" HeaderText="研究方向" SortExpression="tea_toward" />
  25.                    </Columns>
  26.                      <SelectedRowStyle BackColor="#FFE0C0"/> 
  27.                </asp:GridView>
  28.                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ecnuprosysConnectionString %>"
  29.                    SelectCommand="SELECT tea_id, tea_name, tea_toward FROM tea_table WHERE (tea_maxstu > tea_nowstu) GROUP BY tea_toward, tea_id, tea_name">
  30.                </asp:SqlDataSource>
  31.       </div>
  32.    </div>  
  33. </asp:Content>