Hi Gerry,
There is a Combobox for a windowforms and a Dropdownlist for a webform,
That makes the answer not easier.
If you both populate them using a dataset it is very easy.
for the combobox you can use (have a look for) the
datasource
displaymember
valuemember
for the dropdownlist you can use (have a look for) the
datasource
datatexfield
datavaluefield
If you do not use a dataset you have to make objects for that , that is not
difficult, but needs another approach.
I hope this helps?
Cor
Cor
"Gerry" <an*******@discussions.microsoft.com> schreef in bericht
news:0a****************************@phx.gbl...
I need to populate a drop-down list box with names from a
table (via SQL Stored Proc). Each name has a unique ID
associated with them e.g.
NameID 1
Name "My Name"
The problem is how can I tell the combo box the ID
associated with each name added to it.
(I used to use Itemdata from vb6) - is there
something similar/or better I could use here ?
Thanks
Gerry