コード例 #1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        switch (DropDownList1.SelectedValue)
        {
        case "1":
            GridView1.DataSource = admin.memSelUsername(TextBox1.Text.ToString());
            GridView1.DataBind();
            break;

        case "2":
            GridView1.DataSource = admin.memSelName(TextBox1.Text.ToString());
            GridView1.DataBind();
            break;
        }
    }