SqlCommand DropDownList Doldurma

        SqlConnection Baglanti = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["Baglan_DB"].ToString());

        Baglanti.Open();


        SqlCommand cmd = new SqlCommand();

        cmd.Connection = Baglanti;

        cmd.CommandText = "SELECT ID, GrupAdi FROM FotoGaleriGruplari WHERE UstGrupID=0 ORDER BY SiraNo, GrupAdi";

        txtGrupID.DataSource = cmd.ExecuteReader();

        txtGrupID.DataTextField = "GrupAdi";

        txtGrupID.DataValueField = "ID";

        txtGrupID.DataBind();

        cmd.Dispose();

        Baglanti.Close();