ABudair
October 21st, 2003, 07:59 AM
Hello everybody;
I want to ask if i could use the DropDownList as default combox , and in other words i want to add an object with two vars id and name, and everybody knows that in vb.net there is a way to do it by add it simply to combobox. like
dim i as long
for i=0 to ds.tables(0).rows.count -1
ObjlistItem = new ListItem (ds.tables(0).Rows(i).item(Id), _
ds.tables(0).item(Name).ToString)
comboboxName.Items.Add(ObjListItem )
next
but i can't do it in asp.net in drop down list control because drop down list doesn't accept object to add at all.
wt do you think.
any way your reply thanks alot
Ahmed Bedair.
I want to ask if i could use the DropDownList as default combox , and in other words i want to add an object with two vars id and name, and everybody knows that in vb.net there is a way to do it by add it simply to combobox. like
dim i as long
for i=0 to ds.tables(0).rows.count -1
ObjlistItem = new ListItem (ds.tables(0).Rows(i).item(Id), _
ds.tables(0).item(Name).ToString)
comboboxName.Items.Add(ObjListItem )
next
but i can't do it in asp.net in drop down list control because drop down list doesn't accept object to add at all.
wt do you think.
any way your reply thanks alot
Ahmed Bedair.