Hi, i want to display value in textbox when a value is selected in listbox in webapplication vb.net.
Dim con As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\User\Documents\Database4.accdb")
Dim cmd As New OleDbCommand()
cmd.Connection = con
con.Open()
cmd.CommandText = "Select ID,product from List"
' cmd.CommandText = CommandType.Text
Dim da As New OleDbDataAdapter(cmd)
Dim ds As New DataSet
da.Fill(ds, "List")
ListBox1.DataValueField = "ID"
ListBox1.DataTextField = "product"
ListBox1.DataSource = ds
ListBox1.DataMember = "List"
ListBox1.DataBind()
cmd.ExecuteNonQuery()
con.Close()