How to set the selected value of a listbox to the value of a textb

G

Guest

Hi,
I am trying again, and seriously struggling. My problem is that I am trying
to set the selected value in a listbox equal to a value of a textbox, when
you op the listbox. I am not getting that this is so hard to do, so I guess I
am doing something wrong. Anyway here is the problem.
Textbox1 has the value of "Accounting" now when I select the listbox which
contains other departments I want "Accounting" to be pre-selected. I am using
a datatable as datasource and I have tried using
listbox.valuemember="Name"
listbox.selectedvalue="Accounting"

But that doesn't work Any help would be very much appreiciated
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top