Dim str As String = "data source=(local);" _ & "initial catalog=av;uid=sa;pwd=sa;"Dim con As SqlConnection = New SqlConnection(str)con.Open()Dim ds As New DataSetDim da As SqlDataAdapterDim strSql As String = "Select * from tabTest"da = New SqlDataAdapter(strSql, con)da.Fill(ds)// ddl is the name of the dropdown list.ddl.Datasoucre = ds.Tables(0)ddl.DataTextField = "Name"ddl.DataValueField = "id"ddl.DataBind()