|
-
Jun 19th, 2004, 01:39 PM
#1
Thread Starter
Hyperactive Member
Populating dropdownlist with data
I'm an asp.net programmer and am getting my feet wet with windows apps in visual studio.net.
I can populate a dropdownlist on a web page with
Dim sql as String = "Select Id, NAme from Table"
Dim objCommand As New OdbcCommand(sql, objConnection)
objConnection.Open()
Dim objDataReader As OdbcDataReader
objDataReader = objCommand.ExecuteReader()
myList.DataSource = objDataReader
myList.DataBind()
objDataReader.Close()
objConnection.Close()
End Sub
But in vs.net in my windows app it tells me that Databind is not a member of comboBox.
What is the easiest way to populate a dropdownlist in vs.net for a windows app.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|