Can't add to drop down

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to add to the drop down list but nothing happens with this code

Dim ds As DataSet
ds = db.GetRecordset(sSQL)
drpht.DataSource = ds.Tables("table").DefaultView
drpht.DataTextField = "TN"
drpht.DataValueField = "TID"
Dim li As New ListItem
li.Value = "1000000"
li.Text = "1st Division A"
drpht.Items.Add(li)

Can anyone tell me what I am doing wrong?

Thank you,
 
Doh! Rookie mistake ... I had my databind in an unfortunate spot in the code
.... IE: After I was trying to add.

I have solved this problem.

Thank you.
 
Back
Top