<%@ 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:ObjectDataSource ID="ObjectDataSource1" runat="server" 
            DeleteMethod="DeleteQuery" InsertMethod="Insert" 
            OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
            TypeName="DataSet1TableAdapters.studentTableAdapter" UpdateMethod="UpdateQuery">
            <DeleteParameters>
                <asp:Parameter Name="original_stno" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="fname" Type="String" />
                <asp:Parameter Name="lname" Type="String" />
                <asp:Parameter Name="average" Type="Double" />
                <asp:Parameter Name="stno" Type="Int32" />
                <asp:Parameter Name="sex" Type="Boolean" />
                <asp:Parameter Name="course" Type="String" />
                <asp:Parameter Name="original_stno" Type="Int32" />
            </UpdateParameters>
            <SelectParameters>
                <asp:ControlParameter ControlID="GridView1" DefaultValue="Computer" 
                    Name="course" PropertyName="SelectedValue" Type="String" />
            </SelectParameters>
            <InsertParameters>
                <asp:Parameter Name="fname" Type="String" />
                <asp:Parameter Name="lname" Type="String" />
                <asp:Parameter Name="average" Type="Double" />
                <asp:Parameter Name="stno" Type="Int32" />
                <asp:Parameter Name="sex" Type="Boolean" />
                <asp:Parameter Name="course" Type="String" />
            </InsertParameters>
        </asp:ObjectDataSource>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="stno" 
            DataSourceID="ObjectDataSource1">
            <Columns>
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
                    ShowSelectButton="True" />
                <asp:BoundField DataField="fname" HeaderText="fname" SortExpression="fname" />
                <asp:BoundField DataField="lname" HeaderText="lname" SortExpression="lname" />
                <asp:BoundField DataField="average" HeaderText="average" 
                    SortExpression="average" />
                <asp:BoundField DataField="stno" HeaderText="stno" SortExpression="stno" />
                <asp:CheckBoxField DataField="sex" HeaderText="sex" SortExpression="sex" />
                <asp:BoundField DataField="course" HeaderText="course" 
                    SortExpression="course" />
            </Columns>
        </asp:GridView>
    
    </div>
    </form>
</body>
</html>
