<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!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>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:universityConnectionString %>" 
            SelectCommand="SELECT * FROM [student]"></asp:SqlDataSource>
        <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
        <HeaderTemplate>
          <table>
            <tr>
              <th>
                fname</th>
              <th>
                lname</th>
              <th>
                average</th>
              <th>
                stno</th>
              <th>
                sex</th>
              <th>
                course</th>
             </tr>
        </HeaderTemplate>

        <ItemTemplate>
          <tr>
            <td >
              <asp:Label runat="server" ID="Label1" Text='<%# Eval("fname") %>' />
            </td>
            <td>
              <asp:Label runat="server" ID="Label2" Text='<%# Eval("lname") %>' />
            </td>
            <td >
              <asp:Label runat="server" ID="Label5" Text='<%# Eval("average") %>' />
            </td>
            <td >
              <asp:Label runat="server" ID="Label6" Text='<%# Eval("stno") %>' />
            </td>
            <td >
              <asp:Label runat="server" ID="Label7" Text='<%# Eval("sex") %>' />
            </td>
            <td >
              <asp:Label runat="server" ID="Label8" Text='<%# Eval("course") %>' />
            </td>
          </tr>
        </ItemTemplate>
        <FooterTemplate>
          </table>
        </FooterTemplate>
        
        </asp:Repeater>
    
    </div>
    </form>
</body>
</html>
