if (!IsPostBack) { DropDownList1.Items.Clear(); SqlCommand merk = new SqlCommand("SELECT Alanad AS AD FROM TabloAd where Con1='" + param1+ "' ORDER BY AD", serkan); SqlDataReader objDataReader = null; serkan.Open(); DropDownList1.Items.Add("xxx Tipi Seçiniz"); objDataReader = merk.ExecuteReader(); while (objDataReader.Read() == true) { DropDownList1.Items.Add(objDataReader["AD"].ToString()); } objDataReader.Close(); serkan.Close(); }
0 Comments