Helpful Information
 
 
Category: ASP.NET
How to bind a DropDownList to a database field

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...


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?

What object is "Me"?
I don't see the code to bind a DropDownList here. This looks more like a DataGrid.

See this tutorial (http://www.developer.com/net/vb/article.php/10926_3320941_1) for how to make dropdownlists in a DataGrid bound to db fields.










privacy (GDPR)