<%@ 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:DataPager ID="DataPager1" runat="server" PagedControlID="ListView1" 
            PageSize="5">
            <Fields>
                <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                    ShowLastPageButton="True" />
            </Fields>
        </asp:DataPager>
        <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1">
        <LayoutTemplate>
           <table border = "1">
            <tr id = "itemPlaceholder" runat = "server" />
          </table>
        </LayoutTemplate>
        
        
        
        
          <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>

        
        
        </asp:ListView>
    
    </div>
    </form>
</body>
</html>
