Hello, I use a drop downlist "txtmajor" to retrieve data from sql server.
txtmajor.Items.clear()
While reader.Read()
txtmajor.Items.Add(reader.Item("No") & "/" & reader.Item("Subject"))
End While
But when I use txtmajor.SelectedItem.Text.ToString to show the selected item, it is always the first item. How can I solve the problem ?
txtmajor.Items.clear()
While reader.Read()
txtmajor.Items.Add(reader.Item("No") & "/" & reader.Item("Subject"))
End While
But when I use txtmajor.SelectedItem.Text.ToString to show the selected item, it is always the first item. How can I solve the problem ?