hi buddy
this will that you want....
just set properties as per requirement of yours..
try
{
con.Open();
string str = "select CONCAT(1stname, ' (' ,lastname,')') AS mixname from userdbase where pfno='" + sd.epfno + "'";
da = new MySqlDataAdapter(str, con);
ds = new DataSet();
da.TableMappings.Add("table", "userdbase");
da.Fill(ds, "userdbase");
this.listBox1.DataSource = this.ds;
this.listBox1.DisplayMember = "userdbase.mixname ";
this.listBox1.ValueMember = "userdbase.mixname";
con.Close();
da.Dispose();
}
catch (Exception ex)
{
MessageBox.Show("Error" + ex.Message);
}
happy to help