void FillDesignation() { using (SqlConnection con = GetSqlConnection()) { using (SqlCommand com = new SqlCommand("select * from Designation", con)) { con.Open(); SqlDataReader read = com.ExecuteReader(); Ds.DataSource = read; Ds.DataTextField = "Desname"; Ds.DataValueField = "Desid"; Ds.DataBind(); con.Close(); } } }