ajay raju

ajay raju

  • NA
  • 397
  • 0

How to bind the one column data in Listbox control in windows form applications?

Apr 6 2010 2:14 AM

hi!
 i am using listbox control to bind the one column data.  in sql server i take one table like Emp. in that table "Ename"  column data is bind into the listbox control. i done in web application. but in windows applications how to write the code to do this. i write code in web applications  like.
listbox1.datasource = ds.tables[0];
listbox1.datatextfield = "Ename";
listbox1.databind();
Please give a code to do this.
thanks. 

Answers (3)