Beispiel #1
0
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        string result = DropDownList1.SelectedValue.ToString();

        if (result == "1")
        {
            GridView1.DataSource = bm.BindGradeListBySum(Request.QueryString["courseid"].ToString());
            GridView1.DataBind();
        }
        else if (result == "2")
        {
            GridView1.DataSource = bm.BindGradeListByAvg(Request.QueryString["courseid"].ToString());
            GridView1.DataBind();
        }
        else
        {
            GridView1.DataSource = bm.BindGradeListByNumber(Request.QueryString["courseid"].ToString());
            GridView1.DataBind();
        }
    }