How to bind a DropDownList to a database field

flann

Freshman
Joined
Aug 16, 2005
Messages
33
I'm trying to bind a ddl with a database field that is a Yes or No field. I can't seem to figure out how to make it work. In design view, I selected the field from the databindings, and then in code view put the normal...

Code:
            Me.SqlDataAdapter1.SelectCommand.Parameters("@LeadID").Value() = intLeadid
            Me.SqlDataAdapter1.Fill(DsLegal1.ClientInfo)
            Me.DataBind()

My dropdownlist isn't showing me anything, shouldn't it automatically populate the dropdownlist?
 
flann said:
I'm trying to bind a ddl with a database field that is a Yes or No field. I can't seem to figure out how to make it work. In design view, I selected the field from the databindings, and then in code view put the normal...

Code:
            Me.SqlDataAdapter1.SelectCommand.Parameters("@LeadID").Value() = intLeadid
            Me.SqlDataAdapter1.Fill(DsLegal1.ClientInfo)
            Me.DataBind()

My dropdownlist isn't showing me anything, shouldn't it automatically populate the dropdownlist?

Where do you assign the DataSource to "Me"?
 
Back
Top