Hi, I've been able to select a DropDownList item programatically in the past, using syntax like.
StaffName.SelectedValue = "DD"
I had populated those drop down lists like this:
StaffName.Items.Add(New ListItem("Daniel Dunn", "DD"))
But for my current application it does not work, this is how I am populating the drop down list, do I need to do something differnet?
Many Thanks
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Dim myConnectionString As String = ConfigurationManager.ConnectionStrings("DataConnectionString").ConnectionString
Dim myConnection As New SqlConnection(myConnectionString)
myConnection.Open()
Dim Sql As String = " SELECT * "
Sql += " FROM Staff "
S ...
Go to the complete details ...