protected void Button1_Click(object sender, System.EventArgs e) { switch (DropDownList1.SelectedValue) { case "2": GridView1.DataSource = admin.orderpay(false); GridView1.DataBind(); break; case "3": GridView1.DataSource = admin.ordership(false); GridView1.DataBind(); break; } }