I need help :

i have listbox1 and listbox2, fill listbox1 via SQL queries.
When i selected items in listbox1 in listbox2 most show another table.How i to do that?

Recommended Answers

All 4 Replies

Please make clear your problem, which some meaning your word is not give us any clear meaning.

I need help :

i have listbox1 and listbox2, fill listbox1 via SQL queries.
When i selected items in listbox1 in listbox2 most show another table.How i to do that?

So, as an example...you have ListBox1 and ListBox2.
If ListBox1 has three(3) entries ....
Ford
Dodge
GMC
....when you select one item in ListBox1, you want the values in ListBox2 to change??

If so, you just need to set up ListBox2 to Bind() on the ListBox1.SelectedIndexChanged event.

In listbox1 change event write the code which fills listbox2 , am i missing someting in your question

Protected Sub ListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles ListBox1.SelectedIndexChanged

ListBox2.databind()
End sub

Don't forget to make autopostback property of listbox1= True

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.