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

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
Back
Top