For a Windows Forms code sample, please refer to the DataSource property
MSDN documentation for the System.Windows.Forms.ListBox class.
For a Web Forms list box, the approach is similar, but the names of
properties for the display member and the value member are different.
--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"Hrvoje Voda" <hr*********@luatech.com> wrote in message
news:d3**********@ss405.t-com.hr...
It is a normal listBox control and I would like to fill it through
dataset.
"Dmytro Lapshyn [MVP]" <x-****@no-spam-please.hotpop.com> wrote in message
news:uL**************@TK2MSFTNGP10.phx.gbl... Hi,
What particular type of list box is it? What is the datasource (DataSet,
DataReader, etc.)?
Typically you can databind a listbox control to a DataTable instance,
specifying which column to use as the 'key' and which as the value to be
displayed.
--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"Hrvoje Voda" <hr*********@luatech.com> wrote in message
news:d3**********@ss405.t-com.hr... How to Fill a listbox with data from database?
Hrcko