MySqlConnection mcon; MySqlCommand cmd; MySqlDataAdapter da ; cmd = new MySqlCommand(text, mcon); //cmd.CommandText = text; cmd.CommandType = cm; mcon.Open(); da.SelectCommand = cmd; da.Fill(ds); mcon.Close(); dropdownlist1.datasourcw=ds;//dropdownlist1 is from grid view dropdownlist1.datatextfield="deptname dropdownlist1.datavaluefield="deptno" dropdownlist1.databind()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)